I know that Chrome has a known bug not preserving the stacktrace when rethrowing an exception in Javascript.
I have the following code running in Chrome:
try {
try {
runCodeThatMayThrowAnException();
} catch (e) {
// I'm handing the exception here (displaying a nice message or whatever)
// Now I want to rethrow the exception
throw (e);
}
} catch (e) {
// The stacktrace was lost here :(
}
Is there any way to keep the stacktrace? A jQuery plug-in maybe? Any workaround or ideas?