1 package org.codehaus.plexus.classworlds; 2 3 /* 4 * Copyright 2001-2006 Codehaus Foundation. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 /** 20 * Base exception for <code>ClassWorld</code> errors. 21 * 22 * @author <a href="mailto:bob@eng.werken.com">bob mcwhirter</a> 23 */ 24 public class ClassWorldException extends Exception { 25 // ------------------------------------------------------------ 26 // Instance members 27 // ------------------------------------------------------------ 28 29 /** 30 * The world. 31 */ 32 private ClassWorld world; 33 34 // ------------------------------------------------------------ 35 // Constructors 36 // ------------------------------------------------------------ 37 38 /** 39 * Construct. 40 * 41 * @param world The world. 42 */ 43 public ClassWorldException(final ClassWorld world) { 44 this.world = world; 45 } 46 47 /** 48 * Construct. 49 * 50 * @param world The world. 51 * @param msg The detail message. 52 */ 53 public ClassWorldException(final ClassWorld world, final String msg) { 54 super(msg); 55 this.world = world; 56 } 57 58 // ------------------------------------------------------------ 59 // Instance methods 60 // ------------------------------------------------------------ 61 62 /** 63 * Retrieve the world. 64 * 65 * @return The world. 66 */ 67 public ClassWorld getWorld() { 68 return this.world; 69 } 70 }