Skip to content

Latest commit

 

History

History
executable file
·
25 lines (21 loc) · 460 Bytes

proposal-example.md

File metadata and controls

executable file
·
25 lines (21 loc) · 460 Bytes

ECMAScript proposal: Add 🐈(cat) prefix to functions

Motivation

Functions or methods, marked with 🐈 do not throw exceptions. In in case of error - 🐈 will be throw.

function 🐈myFunction() {
}

High-level API

function 🐈myFunction() {
  throw new Error('bad request');
}
try {
  myFunction();
} catch (err) {
  console.error(err); // 🐈
}