-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from Fastholf/add-crash-description
Pass ClassCastException to WrongViewFinderException
- Loading branch information
Showing
3 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
...rc/main/java/com/github/vivchar/rendererrecyclerviewadapter/WrongViewFinderException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
package com.github.vivchar.rendererrecyclerviewadapter; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
/** | ||
* Created by Vivchar Vitaly on 11.07.19. | ||
*/ | ||
|
||
public class WrongViewFinderException extends RuntimeException { | ||
|
||
public WrongViewFinderException() { | ||
public WrongViewFinderException(@NonNull final ClassCastException e) { | ||
super("Looks like you are trying to use a custom ViewFinder, " + | ||
"but forgot to implement or register it, " + | ||
"please use RendererRecyclerViewAdapter.registerViewFinder() to support your custom ViewFinder."); | ||
"but forgot to implement or register it. As a result you've got the following error:" + | ||
" \"" + e.getMessage() + "\". " + | ||
"Please use RendererRecyclerViewAdapter.registerViewFinder() to support your custom ViewFinder."); | ||
} | ||
} |