Page MenuHomeFeedback Tracker

SQF script error handling
Closed, ResolvedPublic

Description

SQF already has capability to throw errors by user command. I'm requesting this feature would be extended so that also script errors are thrown from the engine to the script catch block defined by the user

Details

Severity
Feature
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
try 
{

  _i = 5 / 0;   // Engine throws error

} 
catch
{

  hint _exception;    // Prints "Zero divisor"

};
Additional Information

Since the throw command already exists the engine could simply call that command internally

Event Timeline

gc8 created this task.May 2 2023, 2:05 PM
gc8 edited Steps To Reproduce. (Show Details)May 8 2023, 1:29 PM
gc8 edited Steps To Reproduce. (Show Details)
dedmen closed this task as Resolved.EditedMay 8 2023, 3:30 PM
dedmen claimed this task.
dedmen added a subscriber: dedmen.

No, often requested in the past.
Script error == everything explode and nothing is safe anymore