fromMap static method

AmplifyAlreadyConfiguredException fromMap(
  1. Map<String, String> serializedException
)
override

Instantiates and return a new AmplifyException from the serialized exception data

Implementation

static AmplifyAlreadyConfiguredException fromMap(
  Map<String, String> serializedException,
) {
  if (serializedException['message'] == null) {
    throw const FormatException(
      'Cannot create AmplifyException from map.  Message field is missing',
    );
  }

  return AmplifyAlreadyConfiguredException(
    serializedException['message']!,
    recoverySuggestion: serializedException['recoverySuggestion'],
    underlyingException: serializedException['underlyingException'],
  );
}