title: Exception with multiple parameters in the constructor
body: <p>I would like to know if it is fine to create an exception with multiple parameters in one constructor (different to throwable, string) or if this practice is bad?</p>
  
  <p>Why do I need an exception with multiple parameters, well, let's suppose I am analyzing a matrix, and when there is an error, I will raise an exception with the position. I would like to give a clear error message in the exception, and also I would like to use internationalization, that means, messages in different languages.</p>
  
  <p>For example, the messages could be:</p>
  
  <blockquote>
    <p>There is an error in the position 4, 5.<br>
    Hubo un problema en la fila 4 con columna 5.</p>
  </blockquote>
  
  <p>As you can see, the text is different for both messages, and the values are important for the message in order to be descriptive.</p>
  
  <p>My approach is something like this:</p>
  
  <pre><code>public class MatrixException extends Exception {
    int x;
    int y;
    public MatrixException (int x, int y){
      this.x = x;
      this.y = y;
   }
   public String getMessage(){
     return Messages.getString("MatrixException.Message1") + this.x
         Messages.getString("MatrixException.Message2") + this.y
         Messages.getString("MatrixException.Message3");
   }
  }
  </code></pre>
  
  <p>(The <code>Messages</code> class implements the <code>ResourceBundle</code> class)</p>
  
  <p>With this kind of exception, I could create a descriptive message in the corresponding language, however I have never seen Exceptions with parameters different to String and Throwable.</p>
  
  <p>I have tried to find information about how to write a well-defined exception hierarchy, but there is not a lot of documentation, and nothing about the constructors.</p>
  
  <p>What do you think about my approach?</p>