How do I stop javascript execution?

R

Ralphz

Hi

How do I stop JavaScript execution when I encounter an error?

Is there something similar to PHP's exit or die function?

Thanks
Ralph
 
T

Thomas 'PointedEars' Lahn

Ralphz said:
How do I stop JavaScript execution when I encounter an error?

Is there something similar to PHP's exit or die function?

When will using Google become a school subject? [psf 6.2]

We had that exact same question only a few days ago, and a couple of good
answers to it.

http://jibbering.com/faq/


PointedEars
 
T

Thomas 'PointedEars' Lahn

[Fullquote intended]
Thomas said:
Ralphz said:
How do I stop JavaScript execution when I encounter an error?

Is there something similar to PHP's exit or die function?
When will using Google become a school subject? [psf 6.2]

We had that exact same question only a few days ago, and a couple of good
answers to it.

http://jibbering.com/faq/

Thanks for response.

I was actually trying to find something on the newsgroup and google. All
I have found is was something about using break or return. Return does
not work for me because i don't want to check if all the functions
return false. especially if i want to stop execution in function deep
down in call stack. Break on the other hand looks weird :)

You missed the part about exceptions.


PointedEars
 
T

The Natural Philosopher

Ralphz said:
Hi

How do I stop JavaScript execution when I encounter an error?

Is there something similar to PHP's exit or die function?

Thanks
Ralph
alert("error message") works well for me.
For debugging.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top