bundles / astropy latest / astropy / utils / misc / format_exception
function
astropy.utils.misc:format_exception
source: /astropy/utils/misc.py :85
Signature
def format_exception ( msg , * args , ** kwargs ) Summary
Extended Summary
Fill in information about the exception that occurred.
Given an exception message string, uses new-style formatting arguments {filename}, {lineno}, {func} and/or {text} to fill in information about the exception that occurred. For example:
try:
1/0
except:
raise ZeroDivisionError(
format_except('A divide by zero occurred in {filename} at '
'line {lineno} of function {func}.'))
Any additional positional or keyword arguments passed to this function are also used to format the message.
Aliases
-
astropy.utils.format_exception