04.11.2015 Views

javascript

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 14: Error Handling and Debugging<br />

The Develop menu provides several options for debugging and otherwise working with the page that is<br />

currently loaded. You can click Show Error Console to display a list of JavaScript and other errors. The<br />

console displays the error message, the URL of the error, and the line number for the error<br />

(see Figure 14 - 7 ).<br />

Figure 14-7<br />

When you click on the error message, you are taken to the source code that caused the error. Other than<br />

outputting to the console, JavaScript errors cause no change in the Safari window.<br />

Opera<br />

Opera also hides JavaScript errors by default. All errors are logged to the error console, which can be<br />

displayed by selecting the Tools menu, then Advanced, then Error Console. As with Firefox, the Opera<br />

error console contains information about not only JavaScript errors but also errors or warnings for<br />

HTML, CSS, XML, XSLT, and a number of other sources. You can filter on the type of messages you want<br />

to see by using the drop - down boxes in the lower - left corner (see Figure 14 - 8 ).<br />

470

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!