TestingLibraryElementError.fromJs constructor

TestingLibraryElementError.fromJs(
  1. dynamic jsError, [
  2. StackTrace? jsStackTrace
])

Implementation

factory TestingLibraryElementError.fromJs(/*JsError*/ dynamic jsError, [StackTrace? jsStackTrace]) {
  StackTrace? stack;
  if (jsError is JsError) {
    final jsErrorStack = jsError.stack;
    stack = jsStackTrace ?? (jsErrorStack != null ? StackTrace.fromString(jsErrorStack) : null);
  }
  return TestingLibraryElementError(jsError.toString(), stack);
}