Skip to content

Commit

Permalink
fix exceptions in catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Vennela Kodali authored and Vennela Kodali committed Mar 17, 2020
1 parent 3e035af commit ac12d08
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ dist
.DS_Store
local.properties

#firebase
google-services.json

# Gradle files
.gradle/
Expand Down
3 changes: 1 addition & 2 deletions android/src/main/java/com/bendyworks/capML/TextDetector.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.google.firebase.ml.vision.FirebaseVision
import com.google.firebase.ml.vision.common.FirebaseVisionImage
import com.google.firebase.ml.vision.text.FirebaseVisionTextRecognizer
import org.json.JSONArray
import java.io.IOException
import kotlin.collections.ArrayList


Expand Down Expand Up @@ -52,7 +51,7 @@ class TextDetector {
.addOnFailureListener { e ->
call.reject("FirebaseVisionTextRecognizer couldn't process the given image", e)
}
} catch (e: IOException) {
} catch (e: Exception) {
e.printStackTrace();
call.reject(e.localizedMessage, e)
}
Expand Down
3 changes: 3 additions & 0 deletions examples/text-detection/ImageReader/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ release/
.gradle/
build/

#firebase
google-services.json

# Local configuration file (sdk path, etc)
local.properties

Expand Down

0 comments on commit ac12d08

Please sign in to comment.