-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
Description
Problem: Currently we crash the thread if there is an error ingame.
This can spoil the game so people are sad.
One idea is to take a more "Javascript like approach" and try to continue executing code.
Concretely, we have the following runtime exceptions created by the compiler:
- "Nullpointer exception when calling C.m"
- "Called C.m on invalid object."
- "Double free: object of type C"
- "Out of memory: Could not create C."
- "Index out of Bounds" (for multi-arrays)
Instead of crashing the thread, we could just print the error message and then
- Return the default value from method
min cases 1 and 2. - Just continue after double frees (case 3)
- Destroy a random object or the oldest object in case 4 and use that space for the new object.
- Continue with a default value in case 5.
This issue for discussing which of those make sense, or whether we should keep the current behavior.