Skip to content

Use specific error for exceptions raised by create_scalar_function #3

@pydanny

Description

@pydanny

Typically APSW has more precise errors than Sqlite3, this is one of the exceptions.

When using create_scalar_function in deterministic mode, it is possible to throw an exception based on Sqlite constraints. In sqlite3 this raises a sqlite.NotSupportedError, but there is nothing specific in APSW. In fact, we're not sure what error is raised, so we lump it under apsw.Error. Some better things we can do:

  1. Figure the specific error and capture/raise that as necessary
  2. If there is no specific error, open a ticket, submit a PR to the upstream APSW library

Note

This is documented as a comment in the register_function code within this library

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions