Dart DocumentationshadesUnknownStringColourException

UnknownStringColourException class

Exception thrown when a colour string is not recognised

class UnknownStringColourException implements Exception {

 String _message;
 
 UnknownStringColourException(String colour) : _message = "Invalid colour string $colour";
 
 String toString() {
   return _message;
 }
}

Implements

Exception

Constructors

new UnknownStringColourException(String colour) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
UnknownStringColourException(String colour) : _message = "Invalid colour string $colour";

Methods

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() {
 return _message;
}