PreviousUpNext

15.3.177  src/lib/compiler/back/low/tools/line-number-db/adl-error.api

## Module for simple error handling with filenames/line numbers 

# Compiled by:
#     src/lib/compiler/back/low/tools/line-number-database.lib

# This api is implemented in:
#     src/lib/compiler/back/low/tools/line-number-db/adl-error.pkg

stipulate
    package lnd =  line_number_database;                        # line_number_database          is from   src/lib/compiler/back/low/tools/line-number-db/line-number-database.pkg
herein

    api Adl_Error {
        #
        exception ERROR;

        error_count:    Ref( Int );
        warning_count:  Ref( Int );

        set_loc:        lnd::Location -> Void;
        init:           Void -> Void;

        write_to_log_and_stderr:        String -> Void;

        fail:           String -> X;
        error:          String -> Void;
        warning:        String -> Void;

        error_pos:      (lnd::Location, String) -> Void;
        warning_pos:    (lnd::Location, String) -> Void;

        with_loc:       lnd::Location -> (X -> Y) -> X -> Y;

        errors_and_warnings_summary:    Void -> String;

        # Attach error messages to a log file too 
        #
        write_to_log:   String -> Void;
        open_log_file:  String -> Void;
        close_log_file: Void -> Void;
        logfile:        Void -> String;
    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext