It is important to note that one should avoid using the try-catch-finally construct inside performance-critical functions. The reason is related to the fact that this construct must create a runtime variable to catch the exception object. This runtime creation is a special case in JavaScript and not all browsers handle it with the same degree of efficiency, which means that this operation can cause trouble along the application's critical path, especially when performance is crucial. You can easily replace this construct with simple testing conditions and insert error messages in an object that would act as error registry for the application.