Skip to content

Commit

Permalink
inherit from PyomoException
Browse files Browse the repository at this point in the history
  • Loading branch information
alma-walmsley committed Dec 17, 2024
1 parent 7fa7521 commit 0e7c7c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pyomo/repn/plugins/nl_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
document_kwargs_from_configdict,
)
from pyomo.common.deprecation import relocated_module_attribute
from pyomo.common.errors import DeveloperError, InfeasibleConstraintException
from pyomo.common.errors import DeveloperError, InfeasibleConstraintException, PyomoException
from pyomo.common.gc_manager import PauseGC
from pyomo.common.timing import TicTocTimer

Expand Down Expand Up @@ -85,14 +85,12 @@
)


class NLWriterEmptyModelError(ValueError):
class NLWriterEmptyModelError(PyomoException):
"""
A custom exception to allow handling of a
model with no free variables.
"""

pass


# TODO: make a proper base class
class NLWriterInfo(object):
Expand Down

0 comments on commit 0e7c7c4

Please sign in to comment.