[RGSS3]Rescuing from the main loop.

Hey guys,

I've been experimenting with RGSS3 a lot recently but I came across an annoyance that I never had on previous RGSS versions.
I can't seem to rescue any exceptions from the main loop.

Back on RGSS1 and 2 my code would have looked like that:
  1.  
  2. begin
  3.  # main loop code here...
  4. rescue Exception =­­> error
  5.  # my custom error handling here...
  6. rescue Errno::ENOENT
  7.  # the usual ENOENT error handling here
  8. end
  9.  
Expand to see the code.


On RGSS3, this code doesn't work. I tried the following to no avail:
  1.  
  2. rgss_main {
  3. begin
  4.  SceneManager.run
  5. rescue Exception =­­> error
  6.  # my custom error handling here...
  7. end
  8. }
  9.  
Expand to see the code.


I have also tried to add my begin/rescue clauses in the SceneManager.run method; still nothing.
Any idea on how I could make this work on RGSS3? I really have no clue why it doesn't work.

EDIT:
After more testing, I can rescue built-in exceptions, including RGSSReset, but I can't rescue SystemExit. Why?? O_o

Thanks,
- Dargor
I don't know exactly how exceptions are stored in Ruby, and it's obviously something RGSS3 handles diffierently, but have you tried creating an instance of the SystemExit exception to see if it truly exists in the library? As I don't see why RGSS3 would prevent a rescue of a raised SystemExit exception, since it's just a library, not a wrapper, right?

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=76542