Sorry, should have changed the subject line Michael Heuer wrote:
A few more language questions/feature requests:
I see that NullPointerExceptions are thrown in some situations (but not always, see below) by the vm -- is it possible to throw an Exception?
Is it possible to catch an Exception?
I could simulate throwing an exception by printing out an error message with the offending line number and calling me.exit() . . . is it possible to get the current line number?
In my attempt at an unit test framework for ChucK I crash the vm where I would expect it to throw a NullPointerException. See commented out lines in the attachment at
http://electro-music.com/forum/viewtopic.php?p=154598#154598
michael
On 29/11/2007, Michael Heuer
A few more language questions/feature requests:
I see that NullPointerExceptions are thrown in some situations (but not always, see below) by the vm -- is it possible to throw an Exception?
Is it possible to catch an Exception?
Throw it? I seem to remember Ge put "chucking exceptions" on The List.... :-) He'll know more. Crashing the VM outright is a bug, IMHO, a crashed VM means losing all your work (potentially) and worse yet a VM that will crash may lead to a fear of trying new stuff which I see as a very Bad Thing in a ChucKian context, as I see it. Yours, Kas.
participants (2)
-
Kassen
-
Michael Heuer