tumblr / colossus

I/O and Microservice library for Scala
Apache License 2.0
1.14k stars 96 forks source link

Protect constant callback #581

Closed benblack86 closed 7 years ago

benblack86 commented 7 years ago

I was playing around with callback, because I hear they are like the future πŸ₯ .

The docs say that CallbackExecutionException is thrown if there is an uncaught exception in the execution block of a Callback. This is true for unmapped and mapped callback, but not for constant callback. I added a try/catch!

@DanSimon @nsauro @dxuhuang @aliyakamercan

codecov-io commented 7 years ago

Codecov Report

Merging #581 into develop will increase coverage by 0.02%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #581      +/-   ##
===========================================
+ Coverage     84.9%   84.92%   +0.02%     
===========================================
  Files           99       99              
  Lines         4431     4432       +1     
  Branches       367      367              
===========================================
+ Hits          3762     3764       +2     
+ Misses         669      668       -1
Impacted Files Coverage Ξ”
...sus/src/main/scala/colossus/service/Callback.scala 88.37% <100%> (+0.09%) :arrow_up:
...s/src/main/scala/colossus/metrics/Collection.scala 100% <0%> (+2.56%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 6073ed8...5002b27. Read the comment docs.

jlbelmonte commented 7 years ago

πŸ‘