Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 5c050202
authored
Jul 25, 2014
by
Brian Romanko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing stack trace capturing and switching back to util.inerhits
1 parent
43a43edc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
lib/errors.js
test/error.test.js
lib/errors.js
View file @
5c05020
...
...
@@ -4,6 +4,7 @@
* @fileOverview The Error Objects produced by Sequelize.
*/
var
util
=
require
(
'util'
);
var
error
=
module
.
exports
=
{};
/**
...
...
@@ -15,14 +16,10 @@ error.BaseError = function() {
var
tmp
=
Error
.
apply
(
this
,
arguments
);
tmp
.
name
=
this
.
name
=
'SequelizeBaseError'
;
this
.
stack
=
tmp
.
stack
;
Error
.
captureStackTrace
&&
Error
.
captureStackTrace
(
this
,
this
.
constructor
)
;
this
.
message
=
tmp
.
message
;
return
this
;
};
error
.
BaseError
.
prototype
=
Object
.
create
(
Error
.
prototype
,
{
constructor
:
{
value
:
error
.
BaseError
}
});
util
.
inherits
(
error
.
BaseError
,
Error
);
/**
...
...
@@ -34,12 +31,8 @@ error.ValidationError = function(message, errors) {
error
.
BaseError
.
apply
(
this
,
arguments
);
this
.
name
=
'SequelizeValidationError'
;
this
.
errors
=
errors
||
[];
return
this
;
};
error
.
ValidationError
.
prototype
=
Object
.
create
(
error
.
BaseError
.
prototype
,
{
constructor
:
{
value
:
error
.
ValidationError
}
});
util
.
inherits
(
error
.
ValidationError
,
error
.
BaseError
);
/**
* Finds all validation error items for the path specified.
...
...
test/error.test.js
View file @
5c05020
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment