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 25 extends Exception 26 { 27 // ------------------------------------------------------------ 28 // Instance members 29 // ------------------------------------------------------------ 30 31 /** 32 * The world. 33 */ 34 private ClassWorld world; 35 36 // ------------------------------------------------------------ 37 // Constructors 38 // ------------------------------------------------------------ 39 40 /** 41 * Construct. 42 * 43 * @param world The world. 44 */ 45 public ClassWorldException( final ClassWorld world ) 46 { 47 this.world = world; 48 } 49 50 /** 51 * Construct. 52 * 53 * @param world The world. 54 * @param msg The detail message. 55 */ 56 public ClassWorldException( final ClassWorld world, final String msg ) 57 { 58 super( msg ); 59 this.world = world; 60 } 61 62 // ------------------------------------------------------------ 63 // Instance methods 64 // ------------------------------------------------------------ 65 66 /** 67 * Retrieve the world. 68 * 69 * @return The world. 70 */ 71 public ClassWorld getWorld() 72 { 73 return this.world; 74 } 75 }