ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 4th, 2003, 05:21 PM
benseri benseri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Israel
Posts: 102 benseri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to benseri
Error Handeling

I want To handel the error messages by myself in one part in my script.
I know that in VB I can Use the statment - On error resume next
And I also know that I can retrive the Error Number In VB with Err.Number.

How can I handel the errors by myself in ASP?
I heard about the ASPErr Object, Is it the same thing like the err object in VB?

thanks,
ben.

Reply With Quote
  #2  
Old August 5th, 2003, 03:13 PM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Well you can do the exact same thing in ASP here is an example:

<%@ Language=VBScript %>
<%Option Explicit%>

<%
'NOTICE the Option Explicit at the beginning
On error resume next

Dim z

z = 2
y = 3

'NOTICE I HAVEN'T DECLARE THE VARIABLE y



If Err.number <> 0 Then
Response.Write "Number : " & Err.number & "<br>"
Response.Write "Description : " & Err.Description & "<br>"
Response.Write "Source : " & Err.Source & "<br>"
Response.End
End If

%>


Hope this helps!
Sincerely

Vlince

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Error Handeling


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway