Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1.  
  2.  
  3.  
  4. //one
  5. //two
  6.  
  7. try {
  8.  
  9. //open one
  10. //open two
  11.  
  12. //do stuff with one and two
  13.  
  14. //close one
  15. //close two
  16.  
  17. } catch (Throwable t) {
  18. //oh snap!.. this happended t
  19.  
  20. try {
  21. //close one
  22. } catch {
  23. //log close one failure but don't hijack the reason for the method fail
  24. }
  25.  
  26. try {
  27. //close two
  28. } catch {
  29. //log close two failure but don't hijack the reason for the method fail
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement