void throw_nested_error()

in src/mlio-py/mlio/core/error.cc [62:106]


void throw_nested_error(const std::exception &exc, const py::object &py_exc)
{
    try {
        std::rethrow_if_nested(exc);
    }
    catch (const Not_supported_error &e) {
        set_nested_error(py_exc, e, "NotSupportedError");
    }
    catch (const Invalid_instance_error &e) {
        set_nested_error(py_exc, e, "InvalidInstanceError");
    }
    catch (const Schema_error &e) {
        set_nested_error(py_exc, e, "SchemaError");
    }
    catch (const Data_reader_error &e) {
        set_nested_error(py_exc, e, "DataReaderError");
    }
    catch (const Record_too_large_error &e) {
        set_nested_error(py_exc, e, "RecordTooLargeError");
    }
    catch (const Corrupt_footer_error &e) {
        set_nested_error(py_exc, e, "CorruptFooterError");
    }
    catch (const Corrupt_header_error &e) {
        set_nested_error(py_exc, e, "CorruptHeaderError");
    }
    catch (const Corrupt_record_error &e) {
        set_nested_error(py_exc, e, "CorruptRecordError");
    }
    catch (const Record_error &e) {
        set_nested_error(py_exc, e, "RecordError");
    }
    catch (const Inflate_error &e) {
        set_nested_error(py_exc, e, "InflateError");
    }
    catch (const Stream_error &e) {
        set_nested_error(py_exc, e, "StreamError");
    }
    catch (const Mlio_error &e) {
        set_nested_error(py_exc, e, "MLIOError");
    }
    catch (const std::system_error &e) {
        set_nested_system_error(py_exc, e);
    }
}