handleCustomCommandName method

void handleCustomCommandName(
  1. String name
)

Handle the custom command with the given name.

Implementation

void handleCustomCommandName(final String name) {
  try {
    final f = customCommands[name];
    if (f == null) {
      throw UnimplementedError(
        'There is no command named $name.',
      );
    }
    f(this);
  } on Exception catch (e, s) {
    final f = errorHandler;
    if (f != null) {
      f(e, s);
    } else {
      rethrow;
    }
  }
}