Skip to main content


Topic: Sphere 1.x error behavior (Read 2614 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Sphere 1.x error behavior
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
neoSphere 5.7.1 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Sphere 1.x error behavior
Reply #1
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.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here