AccessViolationException.java

key0-96/src/exceptions/AccessViolationException.java · 689 B

From the archive key0-96.tar.bz2

Download the archive   « Back to the archive contents

package key;

public class AccessViolationException
extends RuntimeException
implements UserOutputException
{
	Object on;
	
	public AccessViolationException( Object o, String msg )
	{
		super( msg );
		on = o;
			
			//  determine who's fault it is
		Player p = Player.getCurrent();
		if( p != null )
			Log.log( "security", p.getName() + ":" + msg + "  (from: " + o.toString() + ":" + o.getClass().getName() + ")" );
		else
			Log.log( "security", "(system process):" + msg + "  (from: " + o.toString() + ":" + o.getClass().getName() + ")" );
		
		printStackTrace();
	}
	
	public void send( InteractiveConnection ic )
	{
		ic.sendFailure( "Access Violation while " + getMessage() );
	}
}

Site Stats

Snippets: 1791
Codebases: 571