r/programminghorror • • Apr 29 '21

Removed - Not Horror Oh god…

Post image

[removed] — view removed post

158 Upvotes

9 comments sorted by

22

u/[deleted] Apr 29 '21

Isn't that on purpose?

5

u/mirodk45 Apr 29 '21

definitely looks like it

16

u/elzaidir Apr 29 '21

You can throw non-exception? As a C/C++ programmer, javascript will never stop to amaze me

19

u/SparkyPotatoo Apr 29 '21

You can throw anything in C++. Including an int.

13

u/elzaidir Apr 29 '21

Wait, I'm not that stupid usually

2

u/TerrorBite Apr 29 '21

You used to be able to raise (throw) any object in Python, but they changed it at some point so you can only raise instances of classes derived from BaseException.

3

u/constant_void Apr 29 '21

lol that is good one.

0

u/[deleted] Apr 29 '21

[deleted]