withErrorConfig static method

void withErrorConfig(
  1. RxErrorConfig config,
  2. void test()
)

Test error configuration

Implementation

static void withErrorConfig(
  RxErrorConfig config,
  void Function() test,
) {
  final originalConfig = getRxErrorConfig();
  setRxErrorConfig(config);

  try {
    test();
  } finally {
    setRxErrorConfig(originalConfig);
  }
}