1LaTeXML::Common::Error(U3s)er Contributed Perl DocumentatLiaoTneXML::Common::Error(3)
2
3
4
6 "LaTeXML::Common::Error" - Error and Progress Reporting and Logging
7 support.
8
10 "LaTeXML::Common::Error" does some simple stack analysis to generate
11 more informative, readable, error messages for LaTeXML. Its routines
12 are used by the error reporting methods from LaTeXML::Global, namely
13 "Warn", "Error" and "Fatal".
14
15 Error Reporting
16 The Error reporting functions all take a similar set of arguments, the
17 differences are in the implied severity of the situation, and in the
18 amount of detail that will be reported.
19
20 The $category is a string naming a broad category of errors, such as
21 "undefined". The set is open-ended, but see the manual for a list of
22 recognized categories. $object is the object whose presence or lack
23 caused the problem.
24
25 $where indicates where the problem occurred; passs in the $gullet or
26 $stomach if the problem occurred during expansion or digestion; pass in
27 a document node if it occurred there. A string will be used as is; if
28 an undefined value is used, the error handler will try to guess.
29
30 The $message should be a somewhat concise, but readable, explanation of
31 the problem, but ought to not refer to the document or any "incident
32 specific" information, so as to support indexing in build systems.
33 @details provides additional lines of information that may be indident
34 specific.
35
36 "Fatal($category,$object,$where,$message,@details);"
37 Signals an fatal error, printing $message along with some context.
38 In verbose mode a stack trace is printed.
39
40 "Error($category,$object,$where,$message,@details);"
41 Signals an error, printing $message along with some context. If in
42 strict mode, this is the same as Fatal(). Otherwise, it attempts
43 to continue processing..
44
45 "Warn($category,$object,$where,$message,@details);"
46 Prints a warning message along with a short indicator of the input
47 context, unless verbosity is quiet.
48
49 "Info($category,$object,$where,$message,@details);"
50 Prints an informational message along with a short indicator of the
51 input context, unless verbosity is quiet.
52
53 "NoteProgress($message);"
54 Prints $message unless the verbosity level below 0. Typically just
55 a short mark to indicate motion, but can be longer; provide your
56 own newlines, if needed.
57
58 "NoteProgressDetailed($message);"
59 Like "NoteProgress", but for noiser progress, only prints when
60 verbosity >= 1.
61
62 Internal Functions
63 No user serviceable parts inside. These symbols are not exported.
64
65 "$string =
66 LaTeXML::Common::Error::generateMessage($typ,$msg,$lng,@more);"
67 Constructs an error or warning message based on the current stack
68 and the current location in the document. $typ is a short string
69 characterizing the type of message, such as "Error". $msg is the
70 error message itself. If $lng is true, will generate a more verbose
71 message; this also uses the VERBOSITY set in the $STATE. Longer
72 messages will show a trace of the objects invoked on the stack,
73 @more are additional strings to include in the message.
74
75 "$string = LaTeXML::Common::Error::stacktrace;"
76 Return a formatted string showing a trace of the stackframes up
77 until this function was invoked.
78
79 "@objects = LaTeXML::Common::Error::objectStack;"
80 Return a list of objects invoked on the stack. This procedure only
81 considers those stackframes which involve methods, and the objects
82 are those (unique) objects that the method was called on.
83
85 Bruce Miller <bruce.miller@nist.gov>
86
88 Public domain software, produced as part of work done by the United
89 States Government & not subject to copyright in the US.
90
91
92
93perl v5.30.0 2019-10-13 LaTeXML::Common::Error(3)