Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

@OrmliteDao and RuntimeExceptionDao #628

@tbruyelle

Description

@tbruyelle

As mentionned in the ormlite documentation :

By default, most of the DAO methods throw SQLException which is the default internal exception for most JDBC and other SQL calls. But in Android-land, especially, most of the exceptions extend RuntimeException so having to put a lot of ignored try ... catch stanzas is inconvenient.
For this reason we’ve added a RuntimeExceptionDao which wraps all calls to the underlying DAO to rethrow the SQL exceptions as runtime exceptons.

I think the @OrmliteDao annotation should handle this. The annotated field type could be Dao or RuntimExceptionDao (currently only Dao is accepted), and according to this type, the relevant constructor will be used to assign the field.

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