Spherical forums

Sphere Development => Engine Development => Topic started by: Fat Cerberus on December 03, 2016, 11:15:08 am

Title: Sphere 1.x error behavior
Post by: Fat Cerberus on December 03, 2016, 11:15:08 am
In the process of assessing minisphere backwards compatibility, I found out that Sphere 1.x is quite misbehaved when certain kinds of errors occur.

If one does this in Sphere 1.5:
Code: (javascript) [Select]
try { LoadImage("nonexistent"); }
catch(e) { }


It produces an uncatchable error and terminates the engine, bypassing the try/catch entirely.  This is not really desirable behavior: I don't think I'll emulate that particular quirk. :P
Title: Re: Sphere 1.x error behavior
Post by: Radnen on December 04, 2016, 12:11:58 am
Oh man this has messed me up many times. Many resource and other functions do indeed quit without throwing an error. I've wrapped my game in a try catch block to catch anything, but many times it just fails flat.