@@ -141,14 +141,14 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
141141 return true ;
142142 } else if (action .equals ("userCompletedAction" )) {
143143 if (args .length () < 1 && args .length () > 2 ) {
144- callbackContext .error (String .format ("Parameter mismatched. 1-2 is required but %d is given" , args . length () ));
144+ callbackContext .error (String .format ("Parameter count mismatch" ));
145145 return false ;
146146 }
147147 cordova .getActivity ().runOnUiThread (r );
148148 return true ;
149149 } else if (action .equals ("sendBranchEvent" )) {
150150 if (args .length () < 1 && args .length () > 2 ) {
151- callbackContext .error (String .format ("Parameter mismatched. 1-2 is required but %d is given" , args . length () ));
151+ callbackContext .error (String .format ("Parameter count mismatch" ));
152152 return false ;
153153 }
154154 cordova .getActivity ().runOnUiThread (r );
@@ -164,7 +164,7 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
164164 return true ;
165165 } else if (action .equals ("createBranchUniversalObject" )) {
166166 if (args .length () != 1 ) {
167- callbackContext .error (String .format ("Parameter mismatched. 1 is required but %d is given" , args . length () ));
167+ callbackContext .error (String .format ("Parameter count mismatch" ));
168168 return false ;
169169 }
170170 cordova .getActivity ().runOnUiThread (r );
@@ -180,21 +180,21 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
180180
181181 } else if (action .equals (("generateShortUrl" ))) {
182182 if (args .length () != 3 ) {
183- callbackContext .error (String .format ("Parameter mismatched. 3 is required but %d is given" , args . length () ));
183+ callbackContext .error (String .format ("Parameter count mismatch" ));
184184 return false ;
185185 }
186186 cordova .getActivity ().runOnUiThread (r );
187187 return true ;
188188 } else if (action .equals ("registerView" )) {
189189 if (args .length () != 1 ) {
190- callbackContext .error (String .format ("Parameter mismatched. 1 is required but %d is given" , args . length () ));
190+ callbackContext .error (String .format ("Parameter count mismatch" ));
191191 return false ;
192192 }
193193 cordova .getActivity ().runOnUiThread (r );
194194 return true ;
195195 } else if (action .equals ("showShareSheet" )) {
196196 if (args .length () < 3 ) {
197- callbackContext .error (String .format ("Parameter mismatched. 3 is required but %d is given" , args . length () ));
197+ callbackContext .error (String .format ("Parameter count mismatch" ));
198198 return false ;
199199 }
200200 cordova .getActivity ().runOnUiThread (r );
@@ -229,7 +229,7 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
229229
230230 } else if (action .equals ("getBranchQRCode" )) {
231231 if (args .length () != 4 ) {
232- callbackContext .error (String .format ("Parameter mismatched. 4 is required but %d is given" , args . length () ));
232+ callbackContext .error (String .format ("Parameter count mismatch" ));
233233 return false ;
234234 }
235235 cordova .getActivity ().runOnUiThread (r );
0 commit comments