Error Handling

Many Miriad routines perform error checking internally, and bomb out if an error is detected. Other Miriad routines pass back a status value (generally the last subroutine argument). A status value of zero indicates success, -1 indicates end-of-file, and a positive value indicates some other error (what the positive values indicate is system dependent). Two routines can be called to indicate an error:
      subroutine bug(severity,text)
      subroutine bugno(severity,number)
Here severity is a single character, being either 'w', 'e' or 'f', meaning warning, error and fatal respectively. When bug or bugno is called with a fatal error, it will not return. Rather it will cause the task to exit. For routine bug, text is a character string describing the error. For routine bugno, number is a status value, returned by a Miriad routine.



Miriad manager
2011-08-19