[#29] Re-added interface name to interface errors since abstract requirement change
parent
a33df4dcbe
commit
87dd1b8961
|
@ -209,36 +209,49 @@ var extend = ( function( extending )
|
||||||
|
|
||||||
var new_interface = createInterface( iname );
|
var new_interface = createInterface( iname );
|
||||||
|
|
||||||
util.propParse( props, {
|
try
|
||||||
assumeAbstract: true,
|
{
|
||||||
|
util.propParse( props, {
|
||||||
|
assumeAbstract: true,
|
||||||
|
|
||||||
property: function()
|
property: function()
|
||||||
{
|
|
||||||
// should never get to this point because of assumeAbstract
|
|
||||||
throw TypeError( 'Unexpected internal error' );
|
|
||||||
},
|
|
||||||
|
|
||||||
getset: function()
|
|
||||||
{
|
|
||||||
// should never get to this point because of assumeAbstract
|
|
||||||
throw TypeError( 'Unexpected internal error' );
|
|
||||||
},
|
|
||||||
|
|
||||||
method: function( name, value, is_abstract, keywords )
|
|
||||||
{
|
|
||||||
// all members must be public
|
|
||||||
if ( keywords[ 'protected' ] || keywords[ 'private' ] )
|
|
||||||
{
|
{
|
||||||
throw TypeError(
|
// should never get to this point because of assumeAbstract
|
||||||
iname + " member " + name + " must be public"
|
throw TypeError( 'Unexpected internal error' );
|
||||||
);
|
},
|
||||||
}
|
|
||||||
|
|
||||||
member_builder.buildMethod(
|
getset: function()
|
||||||
members, null, name, value, keywords
|
{
|
||||||
);
|
// should never get to this point because of assumeAbstract
|
||||||
},
|
throw TypeError( 'Unexpected internal error' );
|
||||||
} );
|
},
|
||||||
|
|
||||||
|
method: function( name, value, is_abstract, keywords )
|
||||||
|
{
|
||||||
|
// all members must be public
|
||||||
|
if ( keywords[ 'protected' ] || keywords[ 'private' ] )
|
||||||
|
{
|
||||||
|
throw TypeError(
|
||||||
|
iname + " member " + name + " must be public"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
member_builder.buildMethod(
|
||||||
|
members, null, name, value, keywords
|
||||||
|
);
|
||||||
|
},
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
catch ( e )
|
||||||
|
{
|
||||||
|
// alter the message to include our name
|
||||||
|
e.message = "Failed to define interface " +
|
||||||
|
( ( iname ) ? iname : '(anonymous)' ) + ": " + e.message
|
||||||
|
;
|
||||||
|
|
||||||
|
// re-throw
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
attachExtend( new_interface );
|
attachExtend( new_interface );
|
||||||
attachStringMethod( new_interface, iname );
|
attachStringMethod( new_interface, iname );
|
||||||
|
|
Loading…
Reference in New Issue