oqtant.util.exceptions API documentation

# oqtant.util.exceptions

View Source

     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): View Source

    17class JobReadError(Exception):
    18    def __init__(self, message):
    19        super().__init__(message)

Common base class for all non-exit exceptions.

JobReadError(message) View Source

    18    def __init__(self, message):
    19        super().__init__(message)

##### Inherited Members

builtins.BaseException
  with_traceback
  args

class AuthorizationError(builtins.Exception): View Source

    22class AuthorizationError(Exception):
    23    def __init__(self, message=None):
    24        super().__init__(message)

Common base class for all non-exit exceptions.

AuthorizationError(message=None) View Source

    23    def __init__(self, message=None):
    24        super().__init__(message)

##### Inherited Members

builtins.BaseException
  with_traceback
  args

class ValidationError(builtins.Exception): View Source

    27class ValidationError(Exception):
    28    def __init__(self, message):
    29        super().__init__(message)

Common base class for all non-exit exceptions.

ValidationError(message) View Source

    28    def __init__(self, message):
    29        super().__init__(message)

##### Inherited Members

builtins.BaseException
  with_traceback
  args

class JobWriteError(builtins.Exception): View Source

    32class JobWriteError(Exception):
    33    pass

Common base class for all non-exit exceptions.

##### Inherited Members

builtins.Exception
  Exception
builtins.BaseException
  with_traceback
  args

class DatabaseError(builtins.Exception): View Source

    36class DatabaseError(Exception):
    37    def __init__(self, message):
    38        super().__init__(message)

Common base class for all non-exit exceptions.

DatabaseError(message) View Source

    37    def __init__(self, message):
    38        super().__init__(message)

##### Inherited Members

builtins.BaseException
  with_traceback
  args

class ParameterError(builtins.Exception): View Source

    41class ParameterError(Exception):
    42    def __init__(self, message):
    43        super().__init__(message)

Common base class for all non-exit exceptions.

ParameterError(message) View Source

    42    def __init__(self, message):
    43        super().__init__(message)

##### Inherited Members

builtins.BaseException
  with_traceback
  args

class JobError(builtins.Exception): View Source

    46class JobError(Exception):
    47    pass

Common base class for all non-exit exceptions.

##### Inherited Members

builtins.Exception
  Exception
builtins.BaseException
  with_traceback
  args

class JobPlotFitError(JobError): View Source

    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

class JobPlotFitMismatchError(JobError): View Source

    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): View Source

    62class VersionWarning(Warning):
    63    def __init__(self, message):
    64        super().__init__(message)

Base class for warning categories.

VersionWarning(message) View Source

    63    def __init__(self, message):
    64        super().__init__(message)

##### Inherited Members

builtins.BaseException
  with_traceback
  args