aagapov
14 years agoOccasional Contributor
Impossible to throw an exception from the 'OnLogError' handler.
Hi,
Can anybody explain me what happens?
Why the code below does not work - TC just rises the error dialog "Exception thrown and not caught".
By the way it worked at least with TC v3. And this approach is very helpful with error handling.
function Main() {
try {
Log.Message("before call");
Log.Error("aaa");
Log.Message("after call");
}
catch (e) {
Log.Message("catch - " + e.description);
}
}
function GeneralEvents_OnLogError(Sender, LogParams)
{
Log.Message("GeneralEvents_OnLogError");
throw ("Exception");
}
Has anybody faced such kind of behaviour?
Are there any workarounds?
Thanks in advance for answers!
Cheers,
Aleksey.
Can anybody explain me what happens?
Why the code below does not work - TC just rises the error dialog "Exception thrown and not caught".
By the way it worked at least with TC v3. And this approach is very helpful with error handling.
function Main() {
try {
Log.Message("before call");
Log.Error("aaa");
Log.Message("after call");
}
catch (e) {
Log.Message("catch - " + e.description);
}
}
function GeneralEvents_OnLogError(Sender, LogParams)
{
Log.Message("GeneralEvents_OnLogError");
throw ("Exception");
}
Has anybody faced such kind of behaviour?
Are there any workarounds?
Thanks in advance for answers!
Cheers,
Aleksey.