Update router.js

Throws an exception if a triggered event is
unhandled. Fixes #1868