Simple error handler for Javascript that makes handling errors in javascript more convienent