class UserError extends Error
{
constructor(code, props)
super(code);
this.props = props;
}
toString()
return this.message+(this.props ? ' '+JSON.stringify(this.props, null, 4) : '');
module.exports = UserError;