MSXValueError#

module wntr.epanet.msx.exceptions

exception MSXValueError[source]#

Bases: EpanetMsxException, ValueError

__init__(code, value, *args, line_num=None, line=None)[source]#

MSX-specific error that is related to an invalid value.

Parameters:
  • code (int or str or MSXErrors) – EPANET-MSX error code (int) or a string mapping to the MSXErrors enum members

  • value (Any) – Value that is invalid

  • args (additional non-keyword arguments, optional) – If there is a string-format within the error code’s text, these will be used to replace the format, otherwise they will be output at the end of the Exception message.

  • line_num (int, optional) – Line number, if reading an INP file, by default None

  • line (str, optional) – Contents of the line, by default None

__new__(**kwargs)#