キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Customize Error Code

If there is an error in my subvi, in the error cluster, I would change the status to True and the source to my error message.  I usually don't change the error code at all.  What are the advantages of using error code?  If I have multiple drivers and they all have etheir own error code, won't there be a conflict?

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 件の賞賛
メッセージ1/5
2,862件の閲覧回数

The code provides detailed information on the error. If you use the recomended ranges for custom error codes and don't create multiple custom error files, you will not have conflicts.

 

Your statement about multiple drivers is confusing. What sort of driver are you talking about and what sort of errors?

メッセージ2/5
2,859件の閲覧回数

How does the code givesextra enough if I put all the error information in the source entry of the error cluster?

 

Let say I have 3 seperate drivers, and each driver uses errro 5001, 5002, and 5003.  Won't that be a conflict? 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 件の賞賛
メッセージ3/5
2,849件の閲覧回数

@jyang72211 wrote:

How does the code givesextra enough if I put all the error information in the source entry of the error cluster?

 

Let say I have 3 seperate drivers, and each driver uses errro 5001, 5002, and 5003.  Won't that be a conflict? 


Usually the error message displays all the possible causes. In your case, if you get error 5001 it will list the 3 messages.

 

As an example: here two possible causes are listed for an error 5000

 

ProjectView001.png

 

Ben64

0 件の賞賛
メッセージ4/5
2,844件の閲覧回数

If you have multiple custom error codes, perhaps you should have a central clearing house for assigning those codes.

 

If you do create custom error codes, you do not need to manually populate the source string and can use it like it normally is to show where the error occured - you now the source of the error. I don't think I would like your unusual way of error handling.

0 件の賞賛
メッセージ5/5
2,837件の閲覧回数