class Error: (source)
Representation of an error in the error log. Attributes: name: The error name. bad_call: Optionally, a `pytype.function.BadCall` of details of a bad function call. details: Optionally, a string of message details. filename: The file in which the error occurred. lineno: The line number at which the error occurred. message: The error message string. methodname: The method in which the error occurred. severity: The error level (error or warning), an integer. keyword: Optionally, the culprit keyword in the line where error is. e.g., message = "No attribute '_submatch' on BasePattern" keyword = _submatch keyword_context: Optionally, a string naming the object on which `keyword` occurs. e.g. the fully qualified module name that a non-existent function doesn't exist on. traceback: Optionally, an error traceback. opcode_name: Optionally, the name of the opcode that raised the error.
Class Method | for |
Create an _Error with the specified name, for use in tests. |
Class Method | with |
Return an error using a stack for position information. |
Method | __init__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | as |
Format the error as a friendly string, optionally with shell coloring. |
Method | drop |
Undocumented |
Method | set |
Undocumented |
Property | bad |
Undocumented |
Property | details |
Undocumented |
Property | filename |
Undocumented |
Property | keyword |
Undocumented |
Property | keyword |
Undocumented |
Property | lineno |
Undocumented |
Property | message |
Undocumented |
Property | methodname |
Undocumented |
Property | name |
Undocumented |
Property | opcode |
Undocumented |
Property | traceback |
Undocumented |
Method | _position |
Return human-readable filename + line number. |
Instance Variable | _bad |
Undocumented |
Instance Variable | _details |
Undocumented |
Instance Variable | _filename |
Undocumented |
Instance Variable | _keyword |
Undocumented |
Instance Variable | _keyword |
Undocumented |
Instance Variable | _lineno |
Undocumented |
Instance Variable | _message |
Undocumented |
Instance Variable | _methodname |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _opcode |
Undocumented |
Instance Variable | _severity |
Undocumented |
Instance Variable | _traceback |
Undocumented |
Return an error using a stack for position information. Args: stack: A list of state.Frame or state.SimpleFrame objects. severity: The error level (error or warning), an integer. message: The error message string. **kwargs: Additional keyword args to pass onto the class ctor. Returns: An Error object.
Undocumented