java.util

Class MissingFormatArgumentException

Implemented Interfaces:
Serializable

public class MissingFormatArgumentException
extends IllegalFormatException

Unchecked exception thrown when there is a format specifier which does not have a corresponding argument or if an argument index refers to an argument that does not exist.

Unless otherwise specified, passing a null argument to any method or constructor in this class will cause a NullPointerException to be thrown.

Since:
1.5
See Also:
Serialized Form

Constructor Summary

MissingFormatArgumentException(String s)
Constructs an instance of this class with the unmatched format specifier.

Method Summary

String
getFormatSpecifier()
Returns the unmatched format specifier.
String
getMessage()

Methods inherited from class java.lang.Throwable

fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

MissingFormatArgumentException

public MissingFormatArgumentException(String s)
Constructs an instance of this class with the unmatched format specifier.
Parameters:
s - Format specifier which does not have a corresponding argument
Usages and Demos :

View More Examples of MissingFormatArgumentException(String s)
   1:         if (arguments == null || effectiveIndex == 0 || effectiveIndex > arguments.length) {
   2:             throw new MissingFormatArgumentException(specifier);
   3:         }
   4:     }

View Full Code Here

Method Details

getFormatSpecifier

public String getFormatSpecifier()
Returns the unmatched format specifier.
Returns:
The unmatched format specifier

getMessage

public String getMessage()
Overrides:
getMessage in interface Throwable