oqtant.util.exceptions
1# Copyright 2023 Infleqtion 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15 16class JobReadError(Exception): 17 def __init__(self, message): 18 super().__init__(message) 19 20 21class AuthorizationError(Exception): 22 def __init__(self, message=None): 23 super().__init__(message) 24 25 26class ValidationError(Exception): 27 def __init__(self, message): 28 super().__init__(message) 29 30 31class JobWriteError(Exception): 32 pass 33 34 35class DatabaseError(Exception): 36 def __init__(self, message): 37 super().__init__(message) 38 39 40class ParameterError(Exception): 41 def __init__(self, message): 42 super().__init__(message) 43 44 45class JobError(Exception): 46 pass 47 48 49class JobPlotFitError(JobError): 50 def __init__(self): 51 super().__init__( 52 "PLOT FIT RESULTS: failed to generate model from provided parameters" 53 ) 54 55 56class JobPlotFitMismatchError(JobError): 57 def __init__(self): 58 super().__init__("PLOT FIT RESULTS: mismatched parameters and model type") 59 60 61class VersionWarning(Warning): 62 def __init__(self, message): 63 super().__init__(message)
class
JobReadError(builtins.Exception):
Common base class for all non-exit exceptions.
Inherited Members
- builtins.BaseException
- with_traceback
- args
class
AuthorizationError(builtins.Exception):
22class AuthorizationError(Exception): 23 def __init__(self, message=None): 24 super().__init__(message)
Common base class for all non-exit exceptions.
Inherited Members
- builtins.BaseException
- with_traceback
- args
class
ValidationError(builtins.Exception):
Common base class for all non-exit exceptions.
Inherited Members
- builtins.BaseException
- with_traceback
- args
class
JobWriteError(builtins.Exception):
Common base class for all non-exit exceptions.
Inherited Members
- builtins.Exception
- Exception
- builtins.BaseException
- with_traceback
- args
class
DatabaseError(builtins.Exception):
Common base class for all non-exit exceptions.
Inherited Members
- builtins.BaseException
- with_traceback
- args
class
ParameterError(builtins.Exception):
Common base class for all non-exit exceptions.
Inherited Members
- builtins.BaseException
- with_traceback
- args
class
JobError(builtins.Exception):
Common base class for all non-exit exceptions.
Inherited Members
- builtins.Exception
- Exception
- builtins.BaseException
- with_traceback
- args
50class JobPlotFitError(JobError): 51 def __init__(self): 52 super().__init__( 53 "PLOT FIT RESULTS: failed to generate model from provided parameters" 54 )
Common base class for all non-exit exceptions.
Inherited Members
- builtins.BaseException
- with_traceback
- args
57class JobPlotFitMismatchError(JobError): 58 def __init__(self): 59 super().__init__("PLOT FIT RESULTS: mismatched parameters and model type")
Common base class for all non-exit exceptions.
Inherited Members
- builtins.BaseException
- with_traceback
- args
class
VersionWarning(builtins.Warning):
Base class for warning categories.
Inherited Members
- builtins.BaseException
- with_traceback
- args