01: /* Licensed to the Apache Software Foundation (ASF) under one or more
02: * contributor license agreements. See the NOTICE file distributed with
03: * this work for additional information regarding copyright ownership.
04: * The ASF licenses this file to You under the Apache License, Version 2.0
05: * (the "License"); you may not use this file except in compliance with
06: * the License. You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package java.util;
17:
18: import org.apache.harmony.luni.util.Msg;
19:
20: /**
21: * The unchecked exception will be thrown out if the format conversion is
22: * unknown.
23: */
24: public class UnknownFormatConversionException extends
25: IllegalFormatException {
26:
27: private static final long serialVersionUID = 19060418L;
28:
29: private String s;
30:
31: /**
32: * Constructs an UnknownFormatConversionException with the unknown format
33: * conversion.
34: *
35: * @param s
36: * The unknown format conversion
37: */
38: public UnknownFormatConversionException(String s) {
39: this .s = s;
40: }
41:
42: /**
43: * Returns the conversion associated with the exception.
44: *
45: * @return The conversion associated with the exception.
46: */
47: public String getConversion() {
48: return s;
49: }
50:
51: /**
52: * Returns the message of the exception.
53: *
54: * @return The message of the exception.
55: */
56: @Override
57: public String getMessage() {
58: return Msg.getString("K0349", s);
59: }
60: }
|