sequelize/sequelize — pull request #1360 by thanpolas (2014-02-07 16:50:49+00:00)
Title: introduce the Sequelize signed Error Objects

Starting with ValidationError. Followup for #1001, will perform the following change:

#### From:

```js
// the save() method can throw all kinds of errors to us,
// we can determine if it's a validation error by examining the message
if (error.message === 'Validation Error') {
```

#### To:

```js
if (error instanceof Sequelize.ValidationError) {
```

Also lays out the groundwork for building upon a pattern of throwing Sequelize branded errors, that's particularly useful when trying to determine when an error came from, say from a `save()` operation... the stack is huge so are the moving parts. The `err instanceof sequelize.error.Base` will surely help.

I haven't yet exposed the `errors` module to the API... i'm not confident on the naming scheme.

1. `sequelize.BaseError`
2. `sequelize.errors.BaseError`
3. `sequelize.err.BaseError`
5. `sequelize.errors.Base`
4. `sequelize.err.Base`