[SAC-HELP] Fwd: Error messages from getfhv etc

Neil Selby neil at blacknest.gov.uk
Tue Feb 25 12:32:31 PST 2014


Brian,

thanks - yes you are right, the current version of the library gives a Warning rather than an error.

I wasn't aware of the sac_warning_off routine, and it looks like it does exactly what I want.

Is there a function which returns the error/warning message associated with a given code?

many thanks,

Neil

Begin forwarded message:

> From: Brian Savage <savage at uri.edu>
> Subject: Re: [SAC-HELP] Error messages from getfhv etc
> Date: 25 February 2014 16:48:53 GMT
> To: SAC HELP <sac-help at iris.washington.edu>
> 
> Neil,
> 
> I agree with you, but accessing an undefined header value is (and has been) defined as an error (warning more recently).
> 
> There is a function call to turn off all errors (or warnings), but it will also disable any errors that you may want to see.
> - sac_warning_off()
> - sac_warning_stdout()
> - sac_warning_stderr()
> - sac_error_off()
> - sac_error_stdout()
> - sac_error_stderr()
> 
> Do you see another way to avoid these pesky error messages ? 
> Should we defining these as "Warnings" ? or
> Turn off the messaging completely for undefined values in the get* functions ? 
> I am asking because I am curious how the community would like to see this handled, as I have been asked this before.
> 
> I think a recent version (circa 2011) has undefined values throws Warnings, not errors.
> 
> Brian Savage
> savage at uri.edu
> 
> On Feb 25, 2014, at 11:21 AM, Neil Selby wrote:
> 
>> The sac_i/o functions getfhv, getihv etc print error messages to standard output if the related header variable is not defined, e.g.:
>> 
>> ERROR 1336: Undefined header field value. DEPMIN
>> 
>> this seems an undesirable behaviour to me, since the functions already return an error value that the programmer can handle in their own way.
>> 
>> Is this the designed behaviour or is it something peculiar about my set-up that can be changed?
>> 
>> 
>> many thanks,
>> 
>> Neil
>> _______________________________________________
>> sac-help mailing list
>> sac-help at iris.washington.edu
>> http://www.iris.washington.edu/mailman/listinfo/sac-help
> 
> 
> _______________________________________________
> sac-help mailing list
> sac-help at iris.washington.edu
> http://www.iris.washington.edu/mailman/listinfo/sac-help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iris.washington.edu/pipermail/sac-help/attachments/20140225/89ec7733/attachment.html>


More information about the sac-help mailing list