aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-08-09 17:52:52 +0200
committerDavid Runge <dave@sleepmap.de>2016-08-09 17:52:52 +0200
commit740db86fc96167ab5a8b517134c76926e0a6b9c3 (patch)
treee498c3fc49d77d671d04ed7df8d8f55a5821d2e3
parentc83c7c1fe4186747ab99c7d05401f60be0241147 (diff)
downloadbowelyzer-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
-rw-r--r--classes/Bowelyzer.sc13
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;
+ }
+ };
});
});
});