From 740db86fc96167ab5a8b517134c76926e0a6b9c3 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 9 Aug 2016 17:52:52 +0200 Subject: classes/Bowelyzer.sc: Updating error handling to be more descriptive in case of network failure. --- classes/Bowelyzer.sc | 13 ++++++++++--- 1 file 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; + } + }; }); }); }); -- cgit v1.2.3-70-g09d2