Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw error when subclass name is not a string #10

Closed
wants to merge 3 commits into from

Conversation

dasilvacontin
Copy link
Owner

No description provided.

@@ -16,6 +16,7 @@
var ErrorInheritor = function () {}
function SubclassError (name, BaseError, props) {
if (name === undefined) throw new Error('Name of subclass must be provided as first argument.')
if (typeof name !== 'string') throw new Error('Espected first argument to be a string in SubclassError(name, [BaseError, [props]])')
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo – Espected -> Expected.

This comment is on a part of the diff that will change after the amend.

@dasilvacontin dasilvacontin force-pushed the pr-comment-test branch 2 times, most recently from 819fbf2 to 6ae2e50 Compare August 25, 2015 15:53
niceStack.splice(1, 1)
niceStack[0] = name
if (message) niceStack[0] += ': ' + message
this.stack = niceStack.join('\n')
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on some part of the code that won't change after force-pushing/squash/amend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant