Forgot a help fix: Drag a dock's title bar, not divider, to reposition
[supercollider.git] / HelpSource / Classes / Pprotect.schelp
blob0b7ad1a4d075e33b75e81d1bb6e7b2e8ac257c35
1 class:: Pprotect
2 summary:: evaluate a function when an error occured in the thread
3 related:: Classes/Ptrace
4 categories:: Streams-Patterns-Events>Patterns>Language Control
6 ClassMethods::
8 method::new
10 argument::pattern
11 any pattern
13 argument::func
14 a link::Classes/Function:: to be evaluated when an error occurs. The error and the thread are passed as arguments to the function.
16 Examples::
18 code::
20 var x;
21 var func = { "an error happened".postln };
22 a = Pprotect(Pseq([1, 3, 3, Pfuncn({ Error.throw }), 2]), func);
23 x = Pbind(\degree, a, \dur, 0.5).play;