Classic ASP Framework
org.classicasp.error

ErrorUtil, adds additional error handling methods.

Example

		
  If TryEx(Err.Number) Then
  	'-- INSERT CODE HERE --'
  End If
  If CatchEx(Err.Number) Then
  	'-- INSERT CODE HERE --'
  End If
  If CatchWhenEx(Err.Number, (a = b)) Then
  	'-- INSERT CODE HERE --'
  End If
  If FinallyEx(Err.Number) Then
  	'-- INSERT CODE HERE --'
  End If
  

Summary

Catch error handling method.
CatchWhen error handling method.
Finally error handling method.
Returns the last error.
Try error handling method.

CatchEx

Public Function CatchEx(ByRef nError)
Catch error handling method.

Example

		
  If CatchEx(Err.Number) Then
  	'-- INSERT CODE HERE --'
  End If
  

CatchWhenEx

Public Function CatchWhenEx(
ByRef nError,
ByRef bExpression)
CatchWhen error handling method.

Example

		
  If CatchWhenEx(Err.Number, (a = b)) Then
  	'-- INSERT CODE HERE --'
  End If
  

FinallyEx

Public Function FinallyEx(ByRef nError)
Finally error handling method.

Example

		
  If FinallyEx(Err.Number) Then
  	'-- INSERT CODE HERE --'
  End If
  

GetLastError

Public Function GetLastError()
Returns the last error.

Example

		
  Set oError = GetLastError()
  

TryEx

Public Function TryEx(ByRef nError)
Try error handling method.

Example

		
  If TryEx(Err.Number) Then
  	'-- INSERT CODE HERE --'
  End If
  

'***ClassicASP.org
'Copyright 2010 ClassicASP.org

'This file is part of ClassicASP Framework.

'ClassicASP-Framework is free software: you can redistribute it and/or modify
'it under the terms of the GNU General Public License as published by
'the Free Software Foundation, version 3 of the License.

'ClassicASP-Framework is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'GNU General Public License for more details.

'You should have received a copy of the GNU General Public License
'along with ClassicASP-Framework. If not, see .

'For additional information please visit .

Created with TwinText