forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


error trapping question

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed May 14, 2003 3:12 am    Post subject: error trapping question Reply with quote

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 Sad maybe this can't be done? please post any feedback


thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed May 14, 2003 4:05 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed May 14, 2003 4:30 am    Post subject: hummm Reply with quote

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 Sad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed May 14, 2003 4:38 am    Post subject: Reply with quote

nope i don't needed a else statement...Smile 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 Sad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group