| | 1 | /* $Header: d:/cvsroot/tads/tads3/TCERR.H,v 1.3 1999/05/17 02:52:27 MJRoberts Exp $ */ |
| | 2 | |
| | 3 | /* |
| | 4 | * Copyright (c) 1999, 2002 Michael J. Roberts. All Rights Reserved. |
| | 5 | * |
| | 6 | * Please see the accompanying license file, LICENSE.TXT, for information |
| | 7 | * on using and copying this software. |
| | 8 | */ |
| | 9 | /* |
| | 10 | Name |
| | 11 | tcerr.h - TADS 3 Compiler Error Management |
| | 12 | Function |
| | 13 | |
| | 14 | Notes |
| | 15 | |
| | 16 | Modified |
| | 17 | 04/22/99 MJRoberts - Creation |
| | 18 | */ |
| | 19 | |
| | 20 | #ifndef TCERR_H |
| | 21 | #define TCERR_H |
| | 22 | |
| | 23 | #include "vmerr.h" |
| | 24 | |
| | 25 | /* |
| | 26 | * Error Severity Levels. |
| | 27 | */ |
| | 28 | enum tc_severity_t |
| | 29 | { |
| | 30 | /* information only - not an error */ |
| | 31 | TC_SEV_INFO, |
| | 32 | |
| | 33 | /* |
| | 34 | * Pedantic warning - doesn't prevent compilation from succeeding, |
| | 35 | * and doesn't even necessarily indicate anything is wrong. We use |
| | 36 | * a separate severity level for these because some users will want |
| | 37 | * to be able to filter these out. |
| | 38 | */ |
| | 39 | TC_SEV_PEDANTIC, |
| | 40 | |
| | 41 | /* |
| | 42 | * warning - does not prevent compilation from succeeding, but |
| | 43 | * indicates a potential problem |
| | 44 | */ |
| | 45 | TC_SEV_WARNING, |
| | 46 | |
| | 47 | /* |
| | 48 | * error - compilation cannot be completed successfully, although it |
| | 49 | * may be possible to continue with compilation to the extent |
| | 50 | * necessary to check for any additional errors |
| | 51 | */ |
| | 52 | TC_SEV_ERROR, |
| | 53 | |
| | 54 | /* fatal - compilation must be immediately aborted */ |
| | 55 | TC_SEV_FATAL, |
| | 56 | |
| | 57 | /* internal error - compilation must be immediately aborted */ |
| | 58 | TC_SEV_INTERNAL |
| | 59 | }; |
| | 60 | |
| | 61 | |
| | 62 | /* English version of message array */ |
| | 63 | extern const err_msg_t tc_messages_english[]; |
| | 64 | extern size_t tc_message_count_english; |
| | 65 | |
| | 66 | /* error message array */ |
| | 67 | extern const err_msg_t *tc_messages; |
| | 68 | extern size_t tc_message_count; |
| | 69 | |
| | 70 | /* look up a message */ |
| | 71 | const char *tcerr_get_msg(int msgnum, int verbose); |
| | 72 | |
| | 73 | #endif /* TCERR_H */ |
| | 74 | |