Skip to content

Hilt: More meaningful error messages #1967

@goldy1992

Description

@goldy1992

First of all, Hilt looks like a really promising project, keep up the good work!

One feature I would like to see is more meaningful error messages at run time and compile time. For instance, one error I always seem to get is:

Caused by: java.lang.ClassCastException: com.mypackage.DaggerMainApplication_HiltComponents_ApplicationC$ActivityRetainedCImpl$ActivityCImpl cannot be cast to com.com.mypackage.MyActivity_GeneratedInjector

This runtime exception basically means that there is an error in the dependency graph meaning something can't be injected, but it would be nice to know what exactly.

Even better, if this problem could be caught and displayed at compile time, then fantastic :)

kind regards,
goldy1992

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions