diff options
author | David Robillard <d@drobilla.net> | 2010-12-14 20:35:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-14 20:35:43 +0000 |
commit | d9a54049e99f6c3963e1f48e04b9a7adcd81899b (patch) | |
tree | 42fb887b2a97c96f550110b88ab18891c6d9da2f /src/PatchageEvent.cpp | |
parent | 14921f4a865f0eb06b45cd70e3ee71e42a8148e0 (diff) | |
download | patchage-d9a54049e99f6c3963e1f48e04b9a7adcd81899b.tar.gz patchage-d9a54049e99f6c3963e1f48e04b9a7adcd81899b.tar.bz2 patchage-d9a54049e99f6c3963e1f48e04b9a7adcd81899b.zip |
Use Raul::log for console logging.
Print error message if unsubscribed client is not found (Re: ticket #137).
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2684 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageEvent.cpp')
-rw-r--r-- | src/PatchageEvent.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp index 6789948..c408f59 100644 --- a/src/PatchageEvent.cpp +++ b/src/PatchageEvent.cpp @@ -15,8 +15,10 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "patchage-config.h" +#include "raul/log.hpp" #include "raul/SharedPtr.hpp" + +#include "patchage-config.h" #include "Patchage.hpp" #include "PatchageCanvas.hpp" #include "PatchageModule.hpp" @@ -33,7 +35,6 @@ using namespace std; - void PatchageEvent::execute(Patchage* patchage) { @@ -50,6 +51,8 @@ PatchageEvent::execute(Patchage* patchage) if (module) { patchage->canvas()->remove_item(module); module.reset(); + } else { + Raul::error << "Unable to find client " << _str << " to remove" << endl; } free(_str); @@ -73,9 +76,9 @@ PatchageEvent::execute(Patchage* patchage) if (port) patchage->enqueue_resize(port->module().lock()); else - cerr << "Unable to create port view" << endl; + Raul::error << "Unable to create port view" << endl; } else { - cerr << "ERROR: Create port with unknown port type" << endl; + Raul::error << "Attempt to create port with unknown type" << endl; } } else if (_type == PORT_DESTRUCTION) { @@ -99,7 +102,7 @@ PatchageEvent::execute(Patchage* patchage) } } else { - cerr << "Unable to find port to destroy" << endl; + Raul::error << "Unable to find port to destroy" << endl; } } else if (_type == CONNECTION) { @@ -110,7 +113,7 @@ PatchageEvent::execute(Patchage* patchage) if (port_1 && port_2) patchage->canvas()->add_connection(port_1, port_2, port_1->color() + 0x22222200); else - cerr << "Unable to find port to connect" << endl; + Raul::error << "Unable to find port to connect" << endl; } else if (_type == DISCONNECTION) { @@ -120,9 +123,7 @@ PatchageEvent::execute(Patchage* patchage) if (port_1 && port_2) patchage->canvas()->remove_connection(port_1, port_2); else - cerr << "Unable to find port to disconnect" << endl; + Raul::error << "Unable to find port to disconnect" << endl; } - - //cerr << "}" << endl << endl; } |