EpanetException#

module wntr.epanet.exceptions

exception EpanetException[source]#

Bases: Exception

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

An Exception class for EPANET Toolkit and IO exceptions.

Parameters:
  • code (int) – The EPANET error code

  • 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) – The line number, if reading an INP file, by default None

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

__new__(**kwargs)#