File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
src/main/java/org/medicmobile/webapp/mobile Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -27,19 +27,21 @@ public class ChtExternalAppHandler {
2727 }
2828
2929 String processResult (int resultCode , Intent intent ) {
30- if (resultCode != RESULT_OK ) {
31- String message = "ChtExternalAppHandler :: Bad result code: %s. The external app either: " +
32- "explicitly returned this result, didn't return any result or crashed during the operation." ;
33-
34- warn (this , message , resultCode );
35- return safeFormat ("console.error('" + message + "')" , resultCode );
36- }
37-
3830 try {
3931 Optional <JSONObject > json = new ChtExternalApp
4032 .Response (intent , this .context )
4133 .getData ();
4234 String data = json .map (JSONObject ::toString ).orElse (null );
35+
36+ if (resultCode != RESULT_OK ) {
37+ String message = "ChtExternalAppHandler :: Bad result code: %s. The external app either: " +
38+ "explicitly returned this result, did not return any result or crashed during the operation. "
39+ + data ;
40+
41+ warn (this , message , resultCode );
42+ return safeFormat ("console.error('" + message + "')" , resultCode );
43+ }
44+
4345 return makeJavaScript (data );
4446
4547 } catch (Exception exception ) {
You can’t perform that action at this time.
0 commit comments