Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Created on Jun 22, 2010, 1:53:26 AM
 
 package com.dmurph.mvc.monitor;
 
Displays warnings to std out.
public class WarningMonitor implements IGlobalEventMonitor {
	public WarningMonitor(){
		this(null);
	}
	public WarningMonitor(IGlobalEventMonitor argMonitor){
		 = argMonitor;
	}

	public void afterDispatch(MVCEvent argEvent) {
		if( != null){
		}
	}

	public void beforeDispatch(MVCEvent argEvent) {
		if( != null){
		}
	}

Warns to the console that an event has no listeners

	public void noListeners(MVCEvent argEvent) {
		if( != null){
		}
		..println(I18n.getText("monitor.noListeners"argEvent.key));
	}

	public void exceptionThrown(MVCEvent argEventException argException) {
		if( != null){
			.exceptionThrown(argEventargException);
		}
		// TODO locale
		..println(I18n.getText("monitor.exception"argEvent.key)+" "+argException);
		argException.printStackTrace(.);
	}
New to GrepCode? Check out our FAQ X