SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
Channel Msg
Class List | |
Context | |
List | |
Mapping |
Class Summary: Context [Detail] | |
+---Msg.Context | +--XML:Error.Context | |
Inherited Fields | |
From Msg.Context: | |
Constructor Summary | |
InitContext(Context, String) | |
NewContext(String): Context Creates a new error context, using the id id. | |
Method Summary | |
GetTemplate(Msg, VAR LString) Returns a template string for the message msg. | |
SetString(Code, String) Maps the error code code onto the error text str. | |
WriteTemplate(Msg, LString, VAR LString) | |
Inherited Methods | |
From Msg.Context: |
Class Summary: List [Detail] | |
+---Msg.MsgList | +--XML:Error.List | |
Inherited Fields | |
From Msg.MsgList: | |
Constructor Summary | |
NewList(): List Creates new error list. | |
Method Summary | |
Write(Channel) Writes the list of error messages to the ouput channel ch. | |
Inherited Methods | |
From Msg.MsgList: |
Class Summary: Mapping [Detail] | |
+--XML:Error.Mapping |
Type Summary | |
Char = Char | |
Code = Code | |
LChar = LChar | |
LString = LString | |
LStringPtr = LStringPtr | |
Msg = Msg | |
String = String | |
StringPtr = StringPtr |
Procedure Summary | |
New(Context, Code): Msg |
Variable Summary | |
errMsgCharPosBase: LONGINT Character position used to refer to the first character of a file in an error message. | |
errMsgColumnBase: LONGINT Column number used to refer to the first character of a line in an error message. | |
errMsgLineBase: LONGINT Line number used to refer to the first line in a file in an error message. |
Class Detail: Context |
Constructor Detail |
PROCEDURE InitContext(c: Context; id: String)
PROCEDURE NewContext(id: String): Context
Creates a new error context, using the id id. id should be a module name.
Method Detail |
PROCEDURE (context: Context) GetTemplate(msg: Msg; VAR templ: LString)
Returns a template string for the message msg. The string may contain attribute references. Instead of the reference `${foo}', the procedure Msg.GetText will insert the textual representation of the attribute with the name `foo'. The special reference `${MSG_CONTEXT}' is replaced by the value of context.id, and `${MSG_CODE}' with msg.code.
The default implementation returns this string:
MSG_CONTEXT: ${MSG_CONTEXT} MSG_CODE: ${MSG_CODE} attribute_name: ${attribute_name}The last line is repeated for every attribute name. The lines are separated by CharClass.eol.
Pre-condition: msg is not NIL.
[Description inherited from GetTemplate]
Redefines: GetTemplate
PROCEDURE (context: Context) SetString(code: Code; str: String)
Maps the error code code onto the error text str. If a mapping for code exists, it is replaced with the new one.
PROCEDURE (context: Context) WriteTemplate(msg: Msg; msgText: LString; VAR templ: LString)
Class Detail: List |
Constructor Detail |
PROCEDURE NewList(): List
Creates new error list.
Method Detail |
PROCEDURE (errList: List) Write(ch: Channel)
Writes the list of error messages to the ouput channel ch. The channel must be writable. The generated list is prefixed by the name of the file to which the errors refer. File names relative to the current working directory are rewritten to relative path names, using the list's `cwdURI' as base.
Class Detail: Mapping |
Type Detail |
TYPE Char = Char
TYPE Code = Code
TYPE LChar = LChar
TYPE LString = LString
TYPE LStringPtr = LStringPtr
TYPE Msg = Msg
TYPE String = String
TYPE StringPtr = StringPtr
Procedure Detail |
PROCEDURE New(context: Context; code: Code): Msg
Variable Detail |
VAR errMsgCharPosBase: LONGINT
Character position used to refer to the first character of a file in an error message. The default is `0'.
VAR errMsgColumnBase: LONGINT
Column number used to refer to the first character of a line in an error message. The default is `0'.
VAR errMsgLineBase: LONGINT
Line number used to refer to the first line in a file in an error message. The default is `0'. Most programs count lines beginning at `1', so you might want to change this before calling the XML parser.