title: Displaying error messages from catch statements with toast
body: <p>I have the following catch statement in my Android application and I would like to display any error messages via toast, can I do that?</p>
  
  <pre><code>catch (Exception e) 
  {
      //Helper.displayExceptionMessage(this, e.getMessage());
      Toast.makeText(this, error, Toast.LENGTH_SHORT).show();
      e.printStackTrace();
  }
  </code></pre>
  
  
  
  <pre><code>public static void displayExceptionMessage(Context context, String msg)
  {
      Toast.makeText(context, msg , Toast.LENGTH_LONG).show();
  }
  </code></pre>
  
  <p>I’ve also tried to make a helper class to display the message but I have no idea how to resolve "Helper".</p>