Opened 9 years ago

Last modified 8 years ago

#404 new enhancement

Consider expanding $? to hold the number of errors of each type

Reported by: Ian Culverwell Owned by: Ian Culverwell
Priority: minor Milestone: Whenever
Component: ROPP (all) Version: 7.1
Keywords: error Cc:

Description

ROPP8.0 beta reviewer Axel von Engeln (EUM) found:

The other issue I noted, we run ropp_fm_bg2ro_1d with some "expert" 
flags, that also cause a warning (e.g. range checking disabled). So 
for now I don't check for warning messages, and only print out 
messages with exit codes > 1. So I might miss something else (as I 
actually did, when I changed my IDL code, messed up the undulation, 
and then didn't catch the warning of ROPP until I really looked at 
it).

So the number of each type of error could be useful. We could store this as, for example,

Z = 2(no of warnings) * 3(no of errors) * (-1)(no of fatal errors).

Then (no of warnings) etc could be unravelled from Z.

There's a risk of overflow if Z is an integer, so perhaps we it could be real, with

(no of warnings) = log2(|Z|) mod log2(3)

(no of errors) = log3(|Z|) mod log3(2) (ish)

and

(no of fatals) = sign(-Z).

Or something like that.

Change history (2)

comment:1 by Ian Culverwell, 9 years ago

I don't think that would necessarily work, actually.

Dave Offiler adds:

ropp_messages() could keep a count of each level.  Would require a standard routine to output on exit.

comment:2 by Ian Culverwell, 8 years ago

Milestone: 9.0Whenever

This isn't going to happen anytime soon.

Note: See TracTickets for help on using tickets.