forked from microsoft/AdaptiveCards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] Change null returns for exceptions to avoid ambiguity (micr…
…osoft#2715) * Fallback with exceptions v1 * Fix bugs in previous version and add more descriptive details to exception * Update comment
- Loading branch information
1 parent
1b628a5
commit 05b1f50
Showing
12 changed files
with
171 additions
and
102 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
20 changes: 20 additions & 0 deletions
20
...roid/adaptivecards/src/main/java/io/adaptivecards/renderer/AdaptiveFallbackException.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.adaptivecards.renderer; | ||
|
||
import io.adaptivecards.objectmodel.BaseElement; | ||
|
||
/*** | ||
* Exception for signalizing that an element could not be rendered and fallback should be performed | ||
*/ | ||
public class AdaptiveFallbackException extends Exception | ||
{ | ||
public AdaptiveFallbackException(BaseElement element) | ||
{ | ||
super("No renderer exists for element type: " + element.GetElementTypeString()); | ||
m_element = element; | ||
} | ||
|
||
// I'm saving this object in case I ever need to debug this | ||
// No getters or setters are provided as outside developers shouldn't have | ||
// to find this Exception (unless overriding the action layout renderer) | ||
private BaseElement m_element = null; | ||
} |
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
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
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
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
Oops, something went wrong.