結果 : how to create an error object in javascript