assertWith static method

void assertWith(
  1. bool condition,
  2. String errorMsg
)

Implementation

static void assertWith(bool condition, String errorMsg) {
  if (!condition) {
    try {
      throw Exception(errorMsg);
    } catch (e, stack) {
      report(e: e, stack: stack);
      rethrow;
    }
  }
}