brepjs API Reference
    Preparing search index...

    Function tryCatch

    • Wraps a throwing function into a Result. The mapError function converts the caught exception into the error type.

      Type Parameters

      • T
      • E

      Parameters

      • fn: () => T
      • mapError: (error: unknown) => E

      Returns Result<T, E>