Correct way to throw exceptions/errors from C to ST
Roland Plüss <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.gnu.general |
|---|---|
| Message-ID | <[email protected]> |
Another something that I could not really figure out using the documentations. Let's say you have a CCallOut from ST to C. Inside this C function something goes wrong, for example an invalid argument passed. How do you properly raise an exception back to Smalltalk? I tried doing something like this: gst_eval_code( "SystemExceptions.InvalidArgument new signal" ); But this causes the VM to call abort since an exception happened outside the bytecode. I assume you need to be more clever in this case. So what is the correct way to throw these kinds of exceptions from inside a C function? -- Yours sincerely Plüss Roland Leader and Head Programmer - Game: Epsylon ( http://www.indiedb.com/games/epsylon ) - Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine , http://dragengine.rptd.ch/wiki ) - Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php ) - As well as various Blender export scripts und game tools _______________________________________________ help-smalltalk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-smalltalk
signature.asc
(application/pgp-signature, 181 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlUfNUEACgkQjKGu9ysRWfr5GACgkXww/UpTECNXbgKGatvmvOTU MuAAnRtsd++9bT8KyAZSyItFcyyEor94 =wlh0 -----END PGP SIGNATURE-----