View Javadoc

1   /*
2    * Copyright 2014 Theo Willows
3    *
4    * This file is part of JArgP.
5    *
6    * JArgP is free software: you can redistribute it and/or modify it under the
7    * terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation, either version 3 of the License, or (at your option) any
9    * later version.
10   *
11   * JArgP is distributed in the hope that it will be useful, but WITHOUT ANY
12   * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13   * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
14   * details.
15   *
16   * You should have received a copy of the GNU Lesser General Public License
17   * along with JArgP.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  
20  package com.munkei.exception;
21  
22  import java.text.MessageFormat;
23  
24  /**
25   *
26   * @author Theo 'Biffen' Willows <theo@willows.se>
27   *
28   * @since 0.0.1
29   */
30  public class ArgumentParsingException
31    extends Exception {
32  
33    private static final long serialVersionUID = 1L;
34  
35    public ArgumentParsingException(Throwable cause,
36                                    String message,
37                                    Object... arguments) {
38      super(MessageFormat.format(message, arguments), cause);
39    }
40  
41    public ArgumentParsingException(String message, Object... arguments) {
42      this(null, message, arguments);
43    }
44  
45  }