Coverage for pyrc \ tools \ errors.py: 61%
18 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-13 16:59 +0200
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-13 16:59 +0200
1# -------------------------------------------------------------------------------
2# Copyright (C) 2026 Joel Kimmich, Tim Jourdan
3# ------------------------------------------------------------------------------
4# License
5# This file is part of PyRC, distributed under GPL-3.0-or-later.
6# ------------------------------------------------------------------------------
9class FixedPositionError(Exception):
10 default_message = "Position is fixed and cannot be changed."
12 def __init__(self, message=default_message):
13 self.message = message
14 super().__init__(self.message)
17class FixedXYError(FixedPositionError):
18 default_message = "Position in X-Y-Plane is fixed and cannot be changed."
20 def __init__(self, message=default_message):
21 self.message = message
22 super().__init__(self.message)
25class FixedZError(FixedPositionError):
26 default_message = "Height is fixed and cannot be changed."
28 def __init__(self, message=default_message):
29 self.message = message
30 super().__init__(self.message)
33class HighCourantNumberError(Exception):
34 def __init__(self):
35 super().__init__(
36 "The courant number is greater than 1. Decrease the simulated time step or enlarge the "
37 "MassFlowNodes in flow direction."
38 )