DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦a98a9476a⟧ TextFile

    Length: 14013 (0x36bd)
    Types: TextFile
    Names: »V«

Derivation

└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
    └─ ⟦0c20f784e⟧ »DATA« 
        └─⟦1abbe589f⟧ 
            └─⟦059497ac5⟧ 
                └─⟦this⟧ 

TextFile

with Xlbt_String;  
use Xlbt_String;

with Xlbmt_Error_Log;  
use Xlbmt_Error_Log;

package Xlbmp_Error_Log is
------------------------------------------------------------------------------
-- X Library Error Log
--
-- Xlbmp_Error_Log - Used internally by the X Library to "log" error messages.
-- Each target machine/operating-system will have it's own conventions
-- so these are isolated to this package.
------------------------------------------------------------------------------
-- Copyright 1989 - 1991 by Rational, Santa Clara, California.
--
--                  All Rights Reserved.
--
-- Permission to use, copy, modify, and distribute this software and its
-- documentation for any purpose and without fee is hereby granted,
-- provided that the above copyright notice(s) appear in all copies and that
-- both that copyright notice(s) and this permission notice appear in
-- supporting documentation, and that the name of Rational not be used in
-- advertising or publicity pertaining to distribution of the software
-- without specific, written prior permission.
--
-- Rational disclaims all warranties with regard to this software, including
-- all implied warranties of merchantability and fitness, in no event shall
-- Rational be liable for any special, indirect or consequential damages or
-- any damages whatsoever resulting from loss of use, data or profits, whether
-- in an action of contract, negligence or other tortious action, arising out
-- of or in connection with the use or performance of this software.
------------------------------------------------------------------------------

--\f


    procedure X_Report (Name1   : X_String;  
                        Name2   : X_String;  
                        Default : X_String;  
                        Arg1    : X_String;  
                        Arg2    : X_String;  
                        Arg3    : X_String;  
                        Arg4    : X_String;  
                        Arg5    : X_String;  
                        Arg6    : X_String;  
                        Kind    : X_Report_Message_Kind);
------------------------------------------------------------------------------
--  Name1   - Specifies the level-one, or main, name of the error message
--  Name2   - Specifies the level-two, or secondary, name of the error message
--  Default - Specifies the default message
--  Arg1    - Specifies "" or else the 1st argument to the message
--  ....
--  Arg6    - Specifies "" or else the 6th argument to the message
--  Kind    - Specifies the kind, or class, of message being reported.
--
-- Invoke the current X_Report_Error procedure variable.  See the
-- comments on Default_X_Report_Error above for a discussion of the
-- parameters.
------------------------------------------------------------------------------

--/ if R1000 then

    function X_Exception_Name return X_String;

--/ else
--//
--//     function X_Exception_Name return X_String;
--//
--/ end if;
------------------------------------------------------------------------------
-- Operating-system/Ada-run-time dependent routine that either a) returns the
-- string name of the current/latest Ada exception, if that is possible, or
-- b) returns "", or c) if you can come up with something useful then return
-- that.
--
-- Always, either, a) this routine has no arguments, or b) all arguments have
-- default values.
------------------------------------------------------------------------------

    procedure X_Report_Information  
                 (Name1   : X_String;  
                  Name2   : X_String;  
                  Default : X_String;  
                  Arg1    : X_String              := "";  
                  Arg2    : X_String              := "";  
                  Arg3    : X_String              := "";  
                  Arg4    : X_String              := "";  
                  Arg5    : X_String              := "";  
                  Arg6    : X_String              := "";  
                  Kind    : X_Report_Message_Kind := Report_Information)  
        renames X_Report;
------------------------------------------------------------------------------
-- This form of X_Report is used to report "informational" messages.
-- An informational message is used to convey some interesting, but not
-- vitally important message, to the user.  Eg. "This application works best
-- with a color monitor but the gray-scale monitor being used is adequate
-- for most tasks."
------------------------------------------------------------------------------

    procedure X_Report_Warning (Name1 : X_String;  
                                Name2 : X_String;  
                                Default : X_String;  
                                Arg1 : X_String := "";  
                                Arg2 : X_String := "";  
                                Arg3 : X_String := "";  
                                Arg4 : X_String := "";  
                                Arg5 : X_String := "";  
                                Arg6 : X_String := "";  
                                Kind : X_Report_Message_Kind := Report_Warning)  
        renames X_Report;
------------------------------------------------------------------------------
-- This form of X_Report is used to report mildly anomolous conditions that
-- may hamper, but not prevent, the overall operation of the application.
-- Eg. "Insufficient memory available for an image that large.  However, there
-- is sufficient space for an image of 500x500 pixels."
------------------------------------------------------------------------------

    procedure X_Report_Error (Name1   : X_String;  
                              Name2   : X_String;  
                              Default : X_String;  
                              Arg1    : X_String              := "";  
                              Arg2    : X_String              := "";  
                              Arg3    : X_String              := "";  
                              Arg4    : X_String              := "";  
                              Arg5    : X_String              := "";  
                              Arg6    : X_String              := "";  
                              Kind    : X_Report_Message_Kind := Report_Error)  
        renames X_Report;
------------------------------------------------------------------------------
-- This form of X_Report is used to report fairly serious error conditions that
-- hamper, but do not prevent, further execution.  Eg. "File protection
-- prevents reading.", or, "I/O error writing output file; file partially
-- written."  These message indicate some kind of failure where the application
-- has a recovery mechanism that probably involves aborting some partially
-- completed user requested operation.
------------------------------------------------------------------------------

    procedure X_Report_Fatal (Name1   : X_String;  
                              Name2   : X_String;  
                              Default : X_String;  
                              Arg1    : X_String              := "";  
                              Arg2    : X_String              := "";  
                              Arg3    : X_String              := "";  
                              Arg4    : X_String              := "";  
                              Arg5    : X_String              := "";  
                              Arg6    : X_String              := "";  
                              Kind    : X_Report_Message_Kind := Report_Fatal)  
        renames X_Report;
------------------------------------------------------------------------------
-- This form of X_Report is used for messages where the application is
-- preparing to terminate its execution in response to some error where
-- recovery will not be attempted.  Eg. "Cannot connect to display;
-- preparing to exit."
------------------------------------------------------------------------------

    procedure X_Report_Exception  
                 (Name1   : X_String;  
                  Name2   : X_String;  
                  Default : X_String;  
                  Arg1    : X_String              := "";  
                  Arg2    : X_String              := "";  
                  Arg3    : X_String              := "";  
                  Arg4    : X_String              := "";  
                  Arg5    : X_String              := "";  
                  Arg6    : X_String              := X_Exception_Name;  
                  Kind    : X_Report_Message_Kind := Report_Exception)  
        renames X_Report;
------------------------------------------------------------------------------
-- Just like X_Report_Error except we are reporting an unexpected Ada exception
-- rather than some kind of operating system or internal error condition.
--
-- The default value for Arg6 is the operating-system/run-time dependent
-- string name of the latest exception.  Some OS/RT's may not support
-- this at all, in which case we don't have a default value at all.
------------------------------------------------------------------------------

--\f

    procedure Default_X_Report_Error (Name1   : X_String;  
                                      Name2   : X_String;  
                                      Default : X_String;  
                                      Arg1    : X_String;  
                                      Arg2    : X_String;  
                                      Arg3    : X_String;  
                                      Arg4    : X_String;  
                                      Arg5    : X_String;  
                                      Arg6    : X_String;  
                                      Kind    : X_Report_Message_Kind);
------------------------------------------------------------------------------
--  Name1   - Specifies the level-one, or main, name of the error message
--  Name2   - Specifies the level-two, or secondary, name of the error message
--  Default - Specifies the default message
--  Arg1    - Specifies "" or else the 1st argument to the message
--  ....
--  Arg6    - Specifies "" or else the 6th argument to the message
--  Kind    - Specifies the kind, or class, of message being reported.
--
-- This subprogram is the default value of the X_Lib.Report_Error procedure
-- variable.  It should not be called directly.  Call one of the X_Report
-- variants above instead; individual applications may wish to redirect
-- or filter error messages.
--
-- Obtains a message from X_Get_Error_String and formats it with
-- X_Format_Error_String.  The arguments to the message are inserted at
-- the appropriate points in the message.  If some argument is not ""
-- and is not used by the message then that argument is placed at the
-- end of the message in a form of "{n:arg}", where n is 1..6 and arg is
-- the argument's value.
--
-- A message may appear in the database in either of two ways.  This way:
--
--      Name1.Name2 : Message Text
--
-- or else in a multipart fashion like this:
--
--      Name1.Name2.1 : First line of message
--      Name1.Name2.2 : Second line of message
--      Name1.Name2.3 : Third line of message
--          ...and so on...
--
-- The message is scanned for two things.  Any Lf character found is taken as
-- a "start a new line here" command.  Thus a message can span multiple lines
-- in the error output.  A single preceding Lf character on a message is
-- ignored.  The other trigger is the '%' character.  "%%" will produce a
-- single '%' in the output.  "%n" where n is 1..6 will introduce the contents
-- of Argn in that place.  "%.n" will simply use up argument n without
-- producing any output; this can be useful when you want to "use" an argument
-- without actually doing so.
------------------------------------------------------------------------------

    generic  
        with procedure Put_Line (Kind : X_Report_Message_Kind;  
                                 Msg  : X_String);  
    procedure X_Format_Error_String (Error : X_String;  
                                     Arg1  : X_String;  
                                     Arg2  : X_String;  
                                     Arg3  : X_String;  
                                     Arg4  : X_String;  
                                     Arg5  : X_String;  
                                     Arg6  : X_String;  
                                     Kind  : X_Report_Message_Kind);
------------------------------------------------------------------------------
--  Error   - Specifies the error message (as from X_Get_Error_String)
--  Arg1    - Specifies "" or else the 1st argument to the message
--  ....
--  Arg6    - Specifies "" or else the 6th argument to the message
--  Kind    - Specifies the kind, or class, of message being reported.
--
-- A helper for Default_X_Report_Error, this subprogram will parse an
-- error message (such as the one returned by X_Get_Error_String) and
-- substitute arguments as specified below.  Each line of text will be
-- passed to the Put_Line formal as it is created.
--
-- The up to 6 arguments to the error message are inserted at the
-- appropriate points in the message.  If some argument is not "" and is
-- not used by the message then that argument is placed at the end of
-- the message in a form of "{n:arg}", where n is 1..6 and arg is the
-- argument's value.
--
-- The message is scanned for two things.  Any Lf character found is taken as
-- a "start a new line here" command.  Thus a message can span multiple lines
-- in the error output.  A single preceding Lf character on a message is
-- ignored.  The other trigger is the '%' character.  "%%" will produce a
-- single '%' in the output.  "%n" where n is 1..6 will introduce the contents
-- of Argn in that place.  "%.n" will simply use up argument n without
-- producing any output; this can be useful when you want to "use" an argument
-- without actually doing so.
------------------------------------------------------------------------------

--\f

end Xlbmp_Error_Log;