"""Define useless commands; raise warning as influence the linac design."""
import logging
from lightwin.core.commands.dummy_command import DummyCommand
[docs]
class Error(DummyCommand):
"""A class that does nothing but raise an error."""
[docs]
def __init__(self, *args, **kwargs) -> None:
"""Raise an error."""
super().__init__(*args, **kwargs)
logging.error(
"The ERROR commands are not implemented in LightWin. As this "
"commands will influence the design of the linac, you should set "
f"the design and comment this commands out.\n{self.line}"
)
return
[docs]
class ErrorBeamDyn(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorBeamStat(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorBendCPLDyn(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorBendCPLStat(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorBendNCPLDyn(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorBendNCPLStat(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorCavCPLDyn(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorCavCPLStat(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorCavNCPLDyn(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorCavNCPLStat(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorCavNCPLStatFile(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorDynFile(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorGaussianCutOff(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorQuadNCPLDyn(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorQuadNCPLStat(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorRFQCelNCPLStat(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorRFQCelNCPLDyn(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorStatFile(Error):
"""A class that does nothing but raise an error."""
[docs]
class ErrorSetRatio(Error):
"""A class that does nothing but raise an error."""