|
-
Feb 15th, 2002, 10:35 AM
#1
Thread Starter
Lively Member
Error Handling in VB
Hi all,
I read some books said that microsoft error messages lie in the range of 1 to 65535. Books recommend using vbObjectError + ? to define our own error constants. vbObjectError's value =
-2147221504.
Why vbObjectError's value = -2147221504 since microsoft error messages only lies in 1 to 65535?
Does this mean all user-defined error constants must be negative?
How can i define my own error constants?
Thanks!
-
Feb 15th, 2002, 10:52 AM
#2
Fanatic Member
VB Code:
Public Const err_num1 = vbObjectError + 1
Public Const err_num2 = vbObjectError + 2
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
-
Feb 15th, 2002, 10:54 AM
#3
Fanatic Member
By the way, you can define your error codes to be whatever you like, they don't have to negative or even outside of the microsoft range.
The only problem with that is then you cannot uniquely identify the error from the error number.
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|