Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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

Copy link
Copy link
@tbruyelle

Description

@tbruyelle
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.