public Object call( Object object, String name, Object[] args )
		throws BSFException
	{
		/*
			If object is null use the interpreter's global scope.
		*/
		if ( object == null )
			try {
				object = interpreter.get("global");
			} catch ( EvalError e ) { 
				throw new BSFException("bsh internal error: "+e.toString()); 
			}

		if ( object instanceof bsh.This )
			try 
			{
				Object value = ((bsh.This)object).invokeMethod( name, args );
				return Primitive.unwrap( value );
			} catch ( InterpreterError e ) 
			{
				throw new BSFException(
					"BeanShell interpreter internal error: "+e );
			} catch ( TargetError e2 ) 
			{
				throw new BSFException(
					"The application script threw an exception: "
					+ e2.getTarget() );
			} catch ( EvalError e3 ) 
			{
				throw new BSFException( "BeanShell script error: "+e3 );
			}
		else
			throw new BSFException(
				"Cannot invoke method: "+name
				+". Object: "+object +" is not a BeanShell scripted object.");
	}