Guest User

Untitled

a guest
Mar 4th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. try {
  2.  
  3. val conn = DriverManager.getConnection("jdbc:mysql://...")
  4.  
  5. // stuff
  6.  
  7. } catch {
  8.  
  9. case ex: SQLException => {
  10.  
  11. // exception handling
  12.  
  13. }
  14.  
  15. } finally {
  16.  
  17. // This doesn't work because of the scope of conn... any thoughts?
  18. conn.close()
  19. }
Add Comment
Please, Sign In to add comment