Is try...catch supported in server-side Javascript?

K

Kris Rudin

I'm trying to modify an existing ASP application, which uses JavaScript as
the server-side scripting language.

Can you use the "try...catch" blocks in server-side JavaScript?

Thanks!
 
C

Chris Barber

I would presume so.

Wouldn't be much point if it didn't cos it wouldn't be able to call itself
JavaScript.

Shouldn't be too hard to try on a simple page - just do a divide by zero
error and catch that.

Chris.

I'm trying to modify an existing ASP application, which uses JavaScript as
the server-side scripting language.

Can you use the "try...catch" blocks in server-side JavaScript?

Thanks!
 
G

golfpoodle

Kris Rudin said:
I'm trying to modify an existing ASP application, which uses JavaScript as
the server-side scripting language.

Can you use the "try...catch" blocks in server-side JavaScript?

Yes, you can.

I use them round all my ADO calls to pick up things like duplicate key
errors etc. Works just fine.

gp
 

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

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top