[Phpmyadmin-devel] surrounding functions by try and catch

Mohamed Ashraf mohamed.ashraf.213 at gmail.com
Wed Jun 19 21:05:38 CEST 2013


Using window.onerror I don't have access to the stacktrace. to get the
stacktrace I need to surround code by try and catch.

I may be able to use javascript to change all references to global
functions and surround them by try and catch statements. surrounding
each and every global function in the window namespace would probably
create a performance hit. however doing the same for only a subset of
functions may be easier. I may for example surround only functions
that start with PMA_ and the functions in the AJAX object.

According to this test [0] the performance hit is not that great so it
may not hurt to add try and catch to all methods but I don't like to
play with code that I donot own since it may cause problems that I may
not be able to understand.

What I am trying to ask is should I surround only PMA_ and AJAX
functions or should I add some extra functions (such as jquery
functions) to the list or should I skip this entirely and rely only on
line number and file name from the window.onerror




More information about the Developers mailing list