473,326 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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

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!
--
Kris Rudin, MS, MCP
Aurora Consulting Group, Inc.
Jul 19 '05 #1
2 2519
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.

"Kris Rudin" <kr****@nospam.com> wrote in message
news:Of**************@tk2msftngp13.phx.gbl...
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!
--
Kris Rudin, MS, MCP
Aurora Consulting Group, Inc.

Jul 19 '05 #2

"Kris Rudin" <kr****@nospam.com> wrote in message
news:Of**************@tk2msftngp13.phx.gbl...
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

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 04/07/03
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark Carter | last post by:
I'm trying to create a mail server in Twisted. I either get SMTPSenderRefused or SMTPException: SMTP AUTH extension not supported by server. What do I need to do to get it to work?
4
by: Nithi Gurusamy | last post by:
I am facing this error after making changes to client configuration utility of SQL Server 2000: Description: An unhandled exception occurred during the execution of the current web request....
7
by: adnanx82 | last post by:
Hi, Does anyone know how a script can detect whether exception handling using try/catch blocks is supported in the browser, so that it can use them to perform better error handling, and a syntax...
37
by: clintonG | last post by:
Has somebody written any guidelines regarding how to determine when try-catch blocks should be used and where their use would or could be considered superfluous? <%= Clinton Gallagher...
9
by: Mark | last post by:
Hello I'm trying to use a Server.Transfer in a try-catch (I cannot put it outside the Try-Catch as it is nested deep within a component that is called in a try-catch loop) The problem is that the...
32
by: cj | last post by:
Another wish of mine. I wish there was a way in the Try Catch structure to say if there wasn't an error to do something. Like an else statement. Try Catch Else Finally. Also because I...
6
by: quanghoc | last post by:
Hi all, I used XMLSpy to validate my XML but it catched one error at a time. Is there anyway to make XMLSpy to catch all errors at once. If XMLSpy does not have this feature, what software out...
2
dmjpro
by: dmjpro | last post by:
i only know the usage of try/catch in JS.... like .... try { }catch(e){alert(e.description);} and ..... try{
4
by: andyehi | last post by:
Dear All, I am new to C# and I am developing an application which will 24hours run on the remote PC..To transfer records from mysql to access db.I have succesfully created the application and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.