Say I have a sample code like this:
The above piece of code will compile and will die at runtime cause the mis-spelling w/o any helpful error messages.
Is there a way to catch this kind of runtime error? I hope there is a way to print a line somewhat like "Subroutine funcc called at line ### is undefined...".
Thanks for your help.
Code:
&funcc(); # Mis-spelling. It should be func, instead of funcc
sub func {
# some implementation here
}
The above piece of code will compile and will die at runtime cause the mis-spelling w/o any helpful error messages.
Is there a way to catch this kind of runtime error? I hope there is a way to print a line somewhat like "Subroutine funcc called at line ### is undefined...".
Thanks for your help.