473,413 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Raising errors - errornumbers

Hi!

I often raise my own errors in code, and I just use ErrorNumber 1, since I
do not use this number for anything (like maintaining a table of
errornumbers or whatever).

I then started wondering... Is this an okay use of raising errors? Should I
use a certain range of numbers for some reason? Is there a best practice for
raising errors - things to consider?

- Klaus
Nov 20 '05 #1
1 1403
Hello,

"Klaus Jensen" <msnews2@icatech..dk> schrieb:
I often raise my own errors in code, and I just use
ErrorNumber 1, since I do not use this number
for anything (like maintaining a table of
errornumbers or whatever).

I then started wondering... Is this an okay use of
raising errors? Should I use a certain range of
numbers for some reason? Is there a best practice for
raising errors - things to consider?


http://msdn.microsoft.com/library/en...vamthraise.asp

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: NavyJay | last post by:
I have a simple for-loop, which instantiates a class object each iteration. As part of my class constructor, __init__(), I check for valid input settings. If there is a problem with this...
1
by: Jen S | last post by:
I feel like I'm missing something obvious here, but I'm stumped... I have a stored procedure with code that looks like: INSERT INTO MyTableA ( ...fields... ) VALUES (...values...) IF...
0
by: spe.stani.be | last post by:
SPE (Stani's Python Editor) is an open-source python IDE with auto indentation & completion, call tips, syntax coloring & highlighting, UML diagrams, class explorer, source index, auto todo list,...
6
by: Dan | last post by:
I've created a pocketpc app which has a startup form containing a listview. The form creates an object which in turn creates a System.Threading.Timer. It keeps track of the Timer state using a...
2
by: Jason | last post by:
I want to raise custom errors. For instance, when my File class tries to copy a file, I check to make sure the file is available (by trying to get an exclusive lock on it). I try for a specific...
2
by: Axel Dahmen | last post by:
Hi, I've added a couple of validators to my page. Now I get a couple of Runtime Errors when I load the page (I have "Show client-script errors" enabled in IE6): "A Runtime Error has occurred....
2
by: davidz | last post by:
When a catchable error occurs in a try block, control is passed to the associated catch block. While I am then able to examine properties of the error using such functions as ERROR_NUMBER() in the...
4
by: python | last post by:
Bad file names, i.e. filenames the OS considers illegal, will cause functions in the os.path module to raise an error. Example: import os.path print os.path.getsize( 'c:/pytest/*.py' ) On...
26
by: buu | last post by:
So, let's say that a user enters an event name in text box, and would like to raise it.. is it possible to call events by their 'name'? Is it possible to enumerate events inside app. and to check...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.