in reply to Re^2: to get the un-forseen errors
in thread to get the un-forseen errors
I am looking for a way to capture the last thrown error in case the perl script aborts due to some error
If the error is printed by a die statement, you can of course catch the exception using eval (and the message will be stored in $@). In the example you gave, this will likely work (unless some of the intervening functions in the call stack do some nasty countermeasures, of course). If the error is just printed without throwing an exception, there is no way to handle it, unless you are willing to modify the source code which causes the error.
|
|---|