diff --git a/lib/ClassBuilder.js b/lib/ClassBuilder.js index 9dd9555..cf971db 100644 --- a/lib/ClassBuilder.js +++ b/lib/ClassBuilder.js @@ -25,9 +25,6 @@ */ var util = require( __dirname + '/util' ), - warn = require( __dirname + '/warn' ), - Warning = warn.Warning, - hasOwn = Object.prototype.hasOwnProperty, @@ -357,36 +354,21 @@ exports.prototype.build = function extend( _, __ ) // build the various class components (XXX: this is temporary; needs // refactoring) - try - { - this.buildMembers( props, - this._classId, - base, - prop_init, - { - all: members, - 'abstract': abstract_methods, - 'static': static_members, - 'virtual': virtual_members, - }, - function( inst ) - { - return new_class.___$$svis$$; - } - ); - } - catch ( e ) - { - // intercept warnings /only/ - if ( e instanceof Warning ) + this.buildMembers( props, + this._classId, + base, + prop_init, { - warn.handle( e ); - } - else + all: members, + 'abstract': abstract_methods, + 'static': static_members, + 'virtual': virtual_members, + }, + function( inst ) { - throw e; + return new_class.___$$svis$$; } - } + ); // reference to the parent prototype (for more experienced users) prototype.___$$parent$$ = base.prototype; diff --git a/lib/MemberBuilder.js b/lib/MemberBuilder.js index 680cef8..4c881ac 100644 --- a/lib/MemberBuilder.js +++ b/lib/MemberBuilder.js @@ -30,7 +30,6 @@ */ var util = require( __dirname + '/util' ), - Warning = require( __dirname + '/warn' ).Warning, visibility = [ 'public', 'protected', 'private' ] ; diff --git a/lib/MemberBuilderValidator.js b/lib/MemberBuilderValidator.js index edb3922..40556b8 100644 --- a/lib/MemberBuilderValidator.js +++ b/lib/MemberBuilderValidator.js @@ -76,10 +76,10 @@ exports.prototype.end = function( state ) /** * Enqueue warning within validation state * - * @param {Object} state validation state - * @param {string} member member name - * @param {string} id warning identifier - * @param {Warning} warn warning + * @param {Object} state validation state + * @param {string} member member name + * @param {string} id warning identifier + * @param {Error} warn warning * * @return {undefined} */