(function from pyomo.common.errors)
pyomo.common.errors
Generate a formatted exception message
This returns a formatted exception message, line wrapped for display on the console and with optional prolog and epilog messages.
msg (str) – The raw exception message
prolog (str, optional) – A message to output before the exception message, msg. If this message is long enough to line wrap, the msg will be indented a level below the prolog message.
msg
prolog
epilog (str, optional) – A message to output after the exception message, msg. If provided, the msg will be indented a level below the prolog / epilog messages.
epilog
exception (Exception, optional) – The raw exception being raised (used to improve initial line wrapping).
width (int, optional) – The line length to wrap the exception message to.
str