javascript, define custom exception code example Example: user defined exceptions in js throw new Error('Exception message');