Dart API Referencedart:coreFormatException

FormatException class

Exception thrown when a string or some other data does not have an expected format and cannot be parsed or processed.

class FormatException implements Exception {
 /**
  * A message describing the format error.
  */
 final String message;

 /**
  * Creates a new FormatException with an optional error [message].
  */
 const FormatException([this.message = ""]);

 String toString() => "FormatException: $message";
}

Implements

Exception

Constructors

const FormatException([String message = ""]) #

Creates a new FormatException with an optional error message.

const FormatException([this.message = ""]);

Properties

final String message #

A message describing the format error.

final String message

Methods

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() => "FormatException: $message";