# exceptions

Python API: `modelconverter.utils.exceptions`

Exception types raised by ModelConverter.

Everything the converter itself considers a failure of the conversion derives from
[ModelconverterException](https://docs.luxonis.com/software-v3/ai-inference/conversion/rvc-conversion/offline/modelconverter/modelconverter-api-reference/utils/exceptions.md),
which the CLI catches to exit with status 1, as opposed to the status 2 it uses for an unexpected error. The module also holds
[exit_with](https://docs.luxonis.com/software-v3/ai-inference/conversion/rvc-conversion/offline/modelconverter/modelconverter-api-reference/utils/exceptions.md),
the helper used where an error is fatal enough to end the process on the spot.

## Classes

### ModelconverterException

Base class of the exceptions raised by ModelConverter.

### ONNXException

Raised when an ONNX model cannot be inspected or modified.

### S3Exception

Raised when an operation on S3 storage fails.

## Functions

### exit_with

```python
def exit_with(exception: BaseException, code: int = 1) -> NoReturn:
```

Log the exception and terminate the process.

Parameters

 * `exception` (`BaseException`): The exception to log, together with its traceback.
 * `code` (`int`): The exit status to terminate the process with.

Returns

 * `NoReturn`
