Pprotect: table of contents
Filter:

Pprotect : FilterPattern : Pattern : AbstractFunction : Object

evaluate a function when an error occured in the thread
Source: Patterns.sc

Class Methods

Pprotect.new(pattern, func)

Arguments:

pattern

any pattern

func

a Function to be evaluated when an error occurs. The error and the thread are passed as arguments to the function.

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

.asStream

.func

.func = value

Examples

(
var x;
var func = { "an error happened".postln };
a = Pprotect(Pseq([1, 3, 3, Pfuncn({ Error.throw }), 2]), func);
x = Pbind(\degree, a, \dur, 0.5).play;
)