Improve Error handling/messages (#82)

* Add image error fields

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Update models

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Improve error handling/messages

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Minor reformat

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Improve error handling

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Add base trait

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Decouple data access methods
Improve error handling

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Minor reformat

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Add pattern matching to handle error
Remove try except blocks

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
This commit is contained in:
Rahul Rudragoudar
2021-04-16 23:22:21 +05:30
committed by GitHub
parent 3a1b01688a
commit 43331f8dd7
7 changed files with 205 additions and 138 deletions

View File

@@ -25,7 +25,7 @@ class BackgroundTask(throttle: Int, timeLimit: Int) {
Captcha.generateChallenge(Parameters("medium", "image/png", "text", Option(Size(0, 0))))
throttleIn -= 1
}
} catch { case exception: Exception => println(exception.getStackTrace()) }
} catch { case exception: Exception => println(exception) }
}
}