invoke method

  1. @override
Future<Output> invoke(
  1. Input input, {
  2. Options? options,
})
override

Runs the tool.

  • input is the input to the tool.
  • options is the options to pass to the tool.

Implementation

@override
Future<Output> invoke(
  final Input input, {
  final Options? options,
}) async {
  try {
    return invokeInternal(input, options: options);
  } on ToolException catch (e) {
    if (handleToolError != null) {
      return handleToolError!(e);
    } else {
      rethrow;
    }
  } catch (e) {
    rethrow;
  }
}