Main Page

Function Options

You can also determine which functions are profiled. To set an entire file so that it won’t be profiled,
right-click on the file in the Loaded Scripts view and select File Options
Don’t Profile Contained
Functions. If you want to disable profiling for a single function, right-click on the function in the Loaded
Scripts view and select Function Options
Don’t Profile.
This chapter introduced the many aspects of errors and error handling in JavaScript. The
handler was covered, including the creation of your own error-message windows. You also learned how
to use the
statement to trap errors in progress. An in-depth discussion of the
followed, introducing you to how you can throw your own JavaScript errors.
Next, several debugging techniques were discussed, ranging from using alerts and Java console messages
to throwing your own errors. You also learned how to create your own
function to make throw-
ing your own errors easier.
Finally, you were introduced to the JavaScript debuggers for Internet Explorer and Mozilla. You learned
how to download, install, and run each debugger in its browser, as well as how to use the debugger to
set breakpoints and step through code.
Error Handling
17_579088 ch14.qxd 3/28/05 11:41 AM Page 443

JavaScript EditorFree JavaScript Editor     Ajax Editor