-- ================= survey_exceptions.ads =========================
-- © Copyright 1999 John Halleck
-- All Rights Reserved
--
--ABSTRACT-- survey_exceptions.ads
-- Exceptions used by the Cave Survey routines.
--
--KEYWORDS-- survey_exceptions.ads
-- Errors.
--
--CONTENTS-- survey_exceptions.ads
-- Date, Department, Author
-- 6oct1999, John Halleck
-- Revision history
-- For each revision: Date, change summary, authorizing document,
-- change department, section, author
-- 6oct1999, Initial Creation, John Halleck
-- Unit purpose
-- Incapsulates error handling for the packages, so that
-- we have uniform error handling.
-- External Units accessed
-- Name, purpose, access summary
-- [None]
-- Exceptions propagated by this unit
-- [None]
-- Machine-dependencies
-- Access type, purpose, and justification
-- [None]
-- Compiler-dependencies
-- [None]
package survey_exceptions is
ERRfalse, -- Expected condition was false.
ERRnotfound, -- Didn't find expected item.
ERRnil, -- Nil access passed.
ERRsame, -- We got the same items, expecting different.
ERRrange, -- Out of range (Index error)
ERRnumeric, -- (Should be constraint error?)
ERRconform, -- Arguments didn't conform (In the sense of size
-- missmatch.
ERRnomem, -- Out of memory.
ERRnodisk, -- Out of disk.
ERRsysIO, -- IO error.
ERRnotimplemented, -- Unwritten code.
ERRmeaning, -- Meaningless operation.
-- (For example, scaling by zero)
ERRvalue, -- Value out of range.
ERRuninitialized, -- Package or value uninitialized.
ERRreinitialized, -- Calling initialize on an already initialized package.
ERRbaddata, -- Data not acceptable.
ERRempty, -- Data not provided
ERRnesting, -- Nesting error.
ERRendoffile, -- End of file.
ERRoverflow, -- More data than space availiable.
ERRcorrupt, -- Impossible error (Internal corruption)
ERRendofline -- End of line.
: exception;
end survey_exceptions;
-- /* --------------------- History Support ------------------------------------ */
--
-- error lasterror; /* Last error code registered */
-- char *lastfile; /* File it was in */
-- int lastline; /* Line of the file */
--
-- /* --------------------- Support routines ---------------------------------- */
--
-- /* Note where an error occurred */
-- #ifdef __FILE__
-- #define noteerror(Error,Text) seterror (Error, __FILE__, __LINE__, Text)
-- #else
-- #define noteerror(Error,Text) seterror (Error, 0, 0, Text)
-- #endif
--
-- extern error seterror (error Which, char *whichfile, int line, char *message);
-- /* This routine just returns the error code given, so
-- * that one can write, for example,
-- * return noteerror(ERRwhatever);
-- */
--
-- /* Output text of last error, if any. (No print if NoError) */
-- extern error dumperror();
--
-- /* Clear an error status */
-- extern error clearerror();
--
-- /* ---------------------- Raw print of error -------------------------------- */
--
-- /* Given a return status, print the error. */
-- extern error printerror (error whichone); /* To standard out */
-- /* Returns zero if it is a known error. */
--
-- /* Exit the program, reporting on an error */
-- extern error aborterror (error whichone, char *text);
--
-- #endif
Go to ...
This page is http://www.cc.utah.edu/~nahaj/cave/survey/code/ada/survey-exceptions.ads.html
© Copyright 2000 by John Halleck, All Rights Reserved.
This snapshot was last modified on February 1st, 2001
And the underlying file was last modified on October 23rd, 1999