1 /* 2 * Javolution - Java(TM) Solution for Real-Time and Embedded Systems 3 * Copyright (C) 2006 - Javolution (http://javolution.org/) 4 * All rights reserved. 5 * 6 * Permission to use, copy, modify, and distribute this software is 7 * freely granted, provided that this notice is preserved. 8 */ 9 package javolution.context; 10 11 /** 12 * This class encapsulates errors or exceptions raised during the execution 13 * of concurrent threads ({@link ConcurrentException} are raised upon exit of 14 * the {@link ConcurrentContext}). 15 * {@link ConcurrentException#getCause} identifies the source of the error. 16 * 17 * @author <a HREF="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a> 18 * @version 1.0, October 4, 2004 19 * @see ConcurrentContext#exit 20 */ 21 public class ConcurrentException extends RuntimeException { 22 23 /** 24 * Holds the cause. 25 */ 26 private Throwable _cause; 27 28 /** 29 * Constructs a {@link ConcurrentException} caused by the specified 30 * error or exception. 31 * 32 * @param cause the cause of the error or exception. 33 */ 34 ConcurrentException(Throwable cause) { 35 _cause = cause; 36 } 37 38 /** 39 * Returns the original cause of the exception or error. 40 * 41 * @return the exception or error as it has been raised by the 42 * <code>j2me.lang.Runnable</code>. 43 */ 44 public Throwable getCause() { 45 return _cause; 46 } 47 48 private static final long serialVersionUID = 1L; 49 }