diff options
author | David Runge <dave@sleepmap.de> | 2016-08-09 17:52:52 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2016-08-09 17:52:52 +0200 |
commit | 740db86fc96167ab5a8b517134c76926e0a6b9c3 (patch) | |
tree | e498c3fc49d77d671d04ed7df8d8f55a5821d2e3 /classes/Bowelyzer.sc | |
parent | c83c7c1fe4186747ab99c7d05401f60be0241147 (diff) | |
download | bowelyzer-740db86fc96167ab5a8b517134c76926e0a6b9c3.tar.gz bowelyzer-740db86fc96167ab5a8b517134c76926e0a6b9c3.tar.bz2 bowelyzer-740db86fc96167ab5a8b517134c76926e0a6b9c3.tar.xz bowelyzer-740db86fc96167ab5a8b517134c76926e0a6b9c3.zip |
classes/Bowelyzer.sc: Updating error handling to be more descriptive in case of network failure.1.0.4
Diffstat (limited to 'classes/Bowelyzer.sc')
-rw-r--r-- | classes/Bowelyzer.sc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/classes/Bowelyzer.sc b/classes/Bowelyzer.sc index be48cd0..349209c 100644 --- a/classes/Bowelyzer.sc +++ b/classes/Bowelyzer.sc @@ -477,9 +477,16 @@ Bowelyzer{ try{ this.forwardToNetAddress(name, amplitude, pitch, hasPitch, onsetDetect); }{ - if(this.verbose,{error("Couldn't send to NetAddr: "++forwardAddr)}); - gui.pingForwardIndicator; - } + |error| + switch(error.species.name) + { 'PrimitiveFailedError' }{ + "".postln; + "Your network is down!".postln; + gui.pingForwardIndicator + }{ + "Unknown exception".postln; error.throw; + } + }; }); }); }); |