You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NoAspectBoundException.java 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. /* *******************************************************************
  2. * Copyright (c) 1999-2001 Xerox Corporation,
  3. * 2002 Palo Alto Research Center, Incorporated (PARC).
  4. * All rights reserved.
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Eclipse Public License v1.0
  7. * which accompanies this distribution and is available at
  8. * http://www.eclipse.org/legal/epl-v10.html
  9. *
  10. * Contributors:
  11. * Xerox/PARC initial implementation
  12. * ******************************************************************/
  13. package org.aspectj.lang;
  14. /**
  15. * Thrown by the <code>aspectOf</code> special method on aspect types
  16. * when there is no aspect of that type currently bound.
  17. */
  18. public class NoAspectBoundException extends RuntimeException {
  19. Throwable cause;
  20. public NoAspectBoundException(String aspectName, Throwable inner) {
  21. super(inner == null ? aspectName :
  22. "Exception while initializing " +aspectName + ": " +inner);
  23. this.cause = inner;
  24. }
  25. public NoAspectBoundException() {
  26. }
  27. public Throwable getCause() { return cause; }
  28. }