function catch_error(cb) {
  try {
    cb();
  } catch (e) {
    return e;
  }
  throw "expected function to throw an error but no error was thrown";
}
/// If no error is emitted, throw a new error
If no error is emitted, throw a new error
If no error is emitted throw a new error
function catch_error(cb) {
  try {
    cb();
  } catch (e) {
    return e;
  }
  throw "expected function to throw an error but no error was thrown";
}
function catch_error ( cb ) { try { cb ( ) ; } catch ( e ) { return e ; } throw "expected function to throw an error but no error was thrown" ; }
If no error is emitted, throw a new error
If no error is emitted throw a new error