|
|
|
|
Reply From: |
eons |
Is horrible when a game closes with an ugly window and frozen background (or just quit) because an expected error occurred (like files corrupted).
You can autoload a scene that has ready some dialog and a nice background, and maybe error information and bug report instructions, to put over the current scene when error happens.
Your error handling scene could listen for events, signals or just have a method to add the error window and remove the calling scene from the tree (and maybe write an error log).
So when an unexpected errors occurs (like a file that doesn’t exists and I forget to handle a possible error for this case) in release mode no information what so ever, no mechanism to close or log it and the game will just continue using unexpected data?
Christian | 2016-12-28 15:15
are you requesting a way to be able to handle unhandling error no matter what it comes?
volzhs | 2016-12-28 15:47
Most languages will exit or output some kind of error even in release mode when you try to reference something in a null variable (invalid memory reference). If you don’t handle them these errors are handled automatic. I’m asking whetter there is a feature like this in this language.
Anyway if there isn’t, its fine. I really like the suggestion above for expected ones and I hope I’ll never forget to check null values.
Christian | 2016-12-28 16:09
Normally, when you don’t expect an error (not even a try-catch) and something really bad happens, the application crashes.
And Godot may print something on the console, need to check.
Ok, is really hard to make the stupid engine to crash xD
Just was able to get a segfault trying to use a method on a null variable without debug enabled.
There are stuff that should not pass a playtesting, like null variables, bad node names or method typos, exporting with debug enabled will throw a message on the console when errors occur.
For errors like corrupted or edited save files, you will have to do the consistency checks (not a common practice) when saving and loading to prevent problems.
So… So far, no way of stopping the execution or throwing a severe exception?
This exists in every single language or platform.
jeancallisti | 2022-11-27 20:45