Error messages

Information about Programming in the MOHID Framework
paulo.chambel@hidromod.com
MOHID Advanced user
Posts: 117
Joined: Thu Jan 01, 1970 00:00
Location: Lisbon
Contact:

Error messages

Postby paulo.chambel@hidromod.com » Fri Jul 15, 2005 10:27

Dear all,
just a tip. When you are programming error messages please do not numbering them like this :

stop 'suborutine - module - ERR01'

more code

stop 'suborutine - module - ERR02'

It's best numbering the errors like this:

stop 'suborutine - module - ERR10'

more code

stop 'suborutine - module - ERR20'

This way when some one want to introduce new error messages between to old ones do not have to renumerate the all subroutine error messages.

Paulo

frank.maretec@ist.utl.pt
MOHID Guru
Posts: 151
Joined: Thu Jan 01, 1970 00:00
Location: Technical University of Lisbon
Contact:

Error Messages

Postby frank.maretec@ist.utl.pt » Mon Jul 18, 2005 22:03

Dear All,

really correct the code should look like:

if (STAT_CALL /= SUCCESS_) stop 'ConstructModel - ModuleModel - ERR10'

This means that the message after the stop statement is composed by: <Name of the subroutine> - <Name of the Module> - <Error Code>

Frank


Return to “MOHID Programming”

Who is online

Users browsing this forum: No registered users and 1 guest