module wntr.epanet.exceptions

exception ENSyntaxError[source]#

Bases: EpanetException, SyntaxError

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

An EPANET exception class that also subclasses SyntaxError

  • 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