<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>exception handling on T[h]ink]er[ing</title>
    <link>https://torokmark.github.io/tags/exception-handling/</link>
    <description>Recent content in exception handling on T[h]ink]er[ing</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 24 Apr 2020 12:00:00 +0100</lastBuildDate>
    <atom:link href="https://torokmark.github.io/tags/exception-handling/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Do you know Java: Use try-with-resource</title>
      <link>https://torokmark.github.io/posts/do-you-know-java-try-with-resource/</link>
      <pubDate>Fri, 24 Apr 2020 12:00:00 +0100</pubDate>
      <guid>https://torokmark.github.io/posts/do-you-know-java-try-with-resource/</guid>
      <description>Try-with-resource gives a safer way to handle exceptions and resources.&#xA;A quite big drawback of try-catch-finally that we have to close resource at the end, otherwise the resource remains locked - not always, but sometimes!&#xA;So either we try not to forget to close the resouce, and place finally at the end, or apply something that does this job instead of us.&#xA;Try-Catch-Finally The hard part comes in finally, which encloses a try-catch, and null check is very easy to forget.</description>
    </item>
    <item>
      <title>Do you know Java: Catch Multiple Exceptions</title>
      <link>https://torokmark.github.io/posts/do-you-know-java-catch-multiple-exceptions/</link>
      <pubDate>Wed, 25 Mar 2020 12:00:00 +0100</pubDate>
      <guid>https://torokmark.github.io/posts/do-you-know-java-catch-multiple-exceptions/</guid>
      <description>Catching multiple exceptions is very useful when we are intended to do the same operations when they are raised.&#xA;The feature introduced in Java 7 and by using it we can place exceptions in the same catch branch.&#xA;The old way looked like as follows.&#xA;try { } catch (SQLException ex) { logger.log(ex); } catch (RemoteException ex) { logger.log(ex); } catch (NullPointerException ex) { logger.log(ex); } In Java 7 and onwards, we can place multiple exceptions in one catch branch.</description>
    </item>
  </channel>
</rss>
