|
May 5, 2001 Suppressing Error Messages Tips: May 2001
Yehuda Shiran, Ph.D.
|
|
Suppressing error messages is a controversial issue in all programming languages. That's a classical programmer dilemma. Should a program screams when a bug is found, or should the bug go unnoticed? Since this is a "religious" issue, it is left for your own decision. What is not questionable is the need for error messages during early development stages of the program. In this phase, you probably need the error messages for debugging your new script.
FlashSound JavaScript API lets you choose whether to suppress error message or not, with the
As a reminder, in order to sonify your page, follow this recipe:
The following JavaScript code include an error, because the variable
We can choose to get or suppress an error message for this JavaScript error. The following script will suppress the error:
And the following script will reveal the error:
Click the following two links to see a demo for each of these two file: Here is the source code for the file that reveals the error:
And here is the source code for the file that suppress the error:
Here is a link you can use to download
People who read this tip also read these tips: Look for similar tips by subject: |