mojotech / json-type-validation

TypeScript JSON type validation
MIT License
155 stars 15 forks source link

Throw an instance of Error, not arbitary object #74

Open yuyaryshev opened 1 year ago

yuyaryshev commented 1 year ago

Throw an instance of Error, not arbitary object, because stack information is only preserved if Error instance or a derived class is used.