[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sc-devel] StartUp:run should protect itself?

Hi -

I'm just getting some of my SC stuff up and running on a new machine,
and I notice that if one of the functions added to StartUp bombs out
with some error (e.g. a ugen I forgot to install, stopping synthdef
compilation), that prevents other startup functions from running.
There's no protection against errors:

	*run {
		done = true;
		"StartUp done.".postln;

Wouldn't it be better to insulate each separate function from the
others by wrapping it in a try{}?

	*run {
		done = true;
		functions.do({ |func|
				"StartUp: an error has occurred.".postln;
				"Thrown during function:".postln;
		"StartUp done.".postln;

The functions added to StartUp should all be independent, since
they're typically coming from different classes/scripts. If you want
one startup thing to depend on another, you can (and should) code that
dependence in a single function to be added to StartUp.

This sound sensible?