JavaScript ã«ã¯ããããããã«ç½ ãããã¾ããããã®ä¸ã®1ã¤ã¯ã¨ã©ã¼ãã³ããªã³ã°ã ã¨æãã¾ãã ä»åã¯ã¨ã©ã¼ãã³ããªã³ã°ã«ããã¦ããã¾ãæ´»ç¨ããã¦ããªãæ°ããããã«ã¹ã¿ã ä¾å¤ããã£ãã使ã£ã¦ã¿ããã¨æãã¾ãã TL;DR necojackarc/extensible-custom-error ã使ãã¨ãã¨ã©ã¼ãªãã¸ã§ã¯ããå¼æ°ã«åãã便å©ãªã«ã¹ã¿ã ä¾å¤ãç°¡åã«å®ç¾©ã§ãããï¼ const ExtensibleCustomError = require('extensible-custom-error'); class MyError extends ExtensibleCustomError {} new MyError('message'); // ã¡ãã»ã¼ã¸ new MyError(error); // ã¨ã©ã¼ãªãã¸ã§ã¯ã new MyError('message', error
{{#tags}}- {{label}}
{{/tags}}