trying<O> function

O trying<O>(
  1. O execute(), {
  2. Logger? log,
})

Implementation

O trying<O>(O execute(), {Logger? log}) {
  try {
    return execute();
  } catch (e, stack) {
    print(e);
    print(stack);
    rethrow;
  }
}