| 37 | ); |
| 38 | |
| 39 | VOID |
| 40 | Error ( |
| 41 | CHAR8 *FileName, |
| 42 | UINT32 LineNumber, |
| 43 | UINT32 MessageCode, |
| 44 | CHAR8 *Text, |
| 45 | CHAR8 *MsgFmt, |
| 46 | ... |
| 47 | ) |
| 48 | /*++ |
| 49 | |
| 50 | Routine Description: |
| 51 | Prints an error message. |
| 52 | |
| 53 | Arguments: |
| 54 | All arguments are optional, though the printed message may be useless if |
| 55 | at least something valid is not specified. |
| 56 | |
| 57 | FileName - name of the file or application. If not specified, then the |
| 58 | utility name (as set by the utility calling SetUtilityName() |
| 59 | earlier) is used. Otherwise "Unknown utility" is used. |
| 60 | |
| 61 | LineNumber - the line number of error, typically used by parsers. If the |
| 62 | utility is not a parser, then 0 should be specified. Otherwise |
| 63 | the FileName and LineNumber info can be used to cause |
| 64 | MS Visual Studio to jump to the error. |
| 65 | |
| 66 | MessageCode - an application-specific error code that can be referenced in |
| 67 | other documentation. |
| 68 | |
| 69 | Text - the text in question, typically used by parsers. |
| 70 | |
| 71 | MsgFmt - the format string for the error message. Can contain formatting |
| 72 | controls for use with the varargs. |
| 73 | |
| 74 | Returns: |
| 75 | None. |
| 76 | |
| 77 | Notes: |
| 78 | We print the following (similar to the Warn() and Debug() |
| 79 | W |
| 80 | Typical error/warning message format: |
| 81 | |
| 82 | bin\VfrCompile.cpp(330) : error C2660: 'AddVfrDataStructField' : function does not take 2 parameters |
| 83 | |
| 84 | BUGBUG -- these three utility functions are almost identical, and |
| 85 | should be modified to share code. |
| 86 | |
| 87 | Visual Studio does not find error messages with: |
| 88 | |
| 89 | " error :" |
| 90 | " error 1:" |
| 91 | " error c1:" |
| 92 | " error 1000:" |
| 93 | " error c100:" |
| 94 | |
| 95 | It does find: |
| 96 | " error c1000:" |