thrown: fix a compile error and add location support
amirite: simplify code