Skip to content

Instantly share code, notes, and snippets.

@steida
Created July 11, 2016 14:20
Show Gist options
  • Select an option

  • Save steida/7e5397cd1cfe629022145095c484d7a6 to your computer and use it in GitHub Desktop.

Select an option

Save steida/7e5397cd1cfe629022145095c484d7a6 to your computer and use it in GitHub Desktop.
import { BaseError } from 'make-error';
export default class ValidationError extends BaseError {
constructor(name, params = {}) {
super(`ValidationError: ${JSON.stringify({ name, params })}`);
this.name = name;
this.params = params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment