@Override
	public synchronized void execute(final Runnable r) 
	{
		queue.offer(new Runnable() {
				public void run() 
				{
					runs = true;
					try 
					{
						r.run();
						// to fire up the exception if there was one.
						if( r instanceof SwingWorker )
							((SwingWorker<?,?>)r).get();
						
					} catch( Exception e ) {
						ApplicationLogger.logError(e);
						
						if( !continueOnException )
						{
							// clear remaining queue and shutdown
							queue.clear();
							exitWithErrorRunnable();
						}
					}
					scheduleNext();
				}
			});
		
		if( currentRunnable == null ) 
	       scheduleNext();
	}