dwave.system.warnings.WarningHandler.issue#
- WarningHandler.issue(msg, category=None, func=None, level=30, data=None)[source]#
Issue a warning.
- Parameters:
msg (str) – The warning message
category (Warning) – Category class of the warning. Defaults to
UserWarning
.level (int) – Level of severity for the warning. Uses the logging warning levels.
func (function) – A function that is executed when the warning level is not
IGNORE
(seeWarningAction
). The function should return a 2-tuple containing a boolean specifying whether the warning should be saved/raised and any relevant data associated with the warning as a dictionary orNone
. The provided data overrides the value given in thedata
parameter.data (dict) – Any data relevant to the warning.