Errors¶
API¶
This module contains the error classes used in the framework.
ErrorFormatter ¶
Bases: Exception
Source code in src/gapper/core/errors.py
extract_traceback_str ¶
Extract the traceback from the exception as a string.
extract_user_traceback ¶
Extract the user traceback from the exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
grader_path | str | None | The path to the grader file. | None |
Source code in src/gapper/core/errors.py
extract_user_traceback_str ¶
Extract the user traceback from the exception as a string.
Source code in src/gapper/core/errors.py
format ¶
format_args ¶
Format the arguments of the error message.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
indent_num | int | The number of spaces to indent the message. | 0 |
Source code in src/gapper/core/errors.py
InternalError ¶
Bases: ErrorFormatter
Raised when an internal error occurs in the framework.
Source code in src/gapper/core/errors.py
NoSubmissionError ¶
Bases: StudentError
Raised when no submission is loaded.
Source code in src/gapper/core/errors.py
SubmissionSyntaxError ¶
Bases: StudentError
Raised when a submission has syntax errors.