| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed May 14, 2003 3:12 am Post subject: error trapping question |
|
|
hello all
i have been playing with error trapping i have a question how can i make it trap a certian error code? meaning if i get a error code 608 at line 201 when its that i would have it display a specail msg? i have tried uses a if/else statement but that didn't work maybe this can't be done? please post any feedback
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed May 14, 2003 4:05 am Post subject: |
|
|
Something like below should work.
| Code: |
:errorsub
IF @EQUAL(@ERROR(E),608)
INFO Error Message for Error 608.
END
exit
|
You can go further than that and check the error code and line number both.
| Code: |
:errorsub
IF @EQUAL(@ERROR(E),608)
IF @EQUAL(@ERROR(N),201)
INFO Error Message for Error 608 at line 201.
END
END
exit
|
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed May 14, 2003 4:30 am Post subject: hummm |
|
|
hummm kk
but i think i needed a else in there to...so if its NOT that error code then display error code like this...
p.s i see why mine didn't work to  _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed May 14, 2003 4:38 am Post subject: |
|
|
nope i don't needed a else statement... i got it working
sorry i meant SS...i guess i have been looking at code to long i can't even read any more....hehehehe again sorry about that
p.s i had a type oo  _________________ Have a nice day  |
|
| Back to top |
|
 |
|