Coverage Report - org.apache.maven.enforcer.rule.api.EnforcerRuleException
 
Classes in this File Line Coverage Branch Coverage Complexity
EnforcerRuleException
0%
0/12
N/A
1
 
 1  
 package org.apache.maven.enforcer.rule.api;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *  http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 /**
 23  
  * An exception occurring during the execution of a rule. Based off of
 24  
  * EnforcerRuleException, but separated to keep the rule dependencies to a
 25  
  * minimum.
 26  
  *
 27  
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
 28  
  * @version $Id: EnforcerRuleException.java 805162 2009-08-17 21:48:52Z hboutemy $
 29  
  */
 30  
 public class EnforcerRuleException
 31  
     extends Exception
 32  
 {
 33  
 
 34  
     /** serialVersionUID. */
 35  
     private static final long serialVersionUID = 1L;
 36  
 
 37  
     /** The source. */
 38  
     protected Object source;
 39  
 
 40  
     /** The long message. */
 41  
     protected String longMessage;
 42  
 
 43  
     /**
 44  
      * Gets the long message.
 45  
      *
 46  
      * @return the long message
 47  
      */
 48  
     public String getLongMessage()
 49  
     {
 50  0
         return longMessage;
 51  
     }
 52  
 
 53  
     /**
 54  
      * Gets the source.
 55  
      *
 56  
      * @return the source
 57  
      */
 58  
     public Object getSource()
 59  
     {
 60  0
         return source;
 61  
     }
 62  
 
 63  
     /**
 64  
      * Construct a new <code>EnforcerRuleException</code> exception providing
 65  
      * the source and a short and long message.
 66  
      *
 67  
      * @param source the source
 68  
      * @param shortMessage the short message
 69  
      * @param longMessage the long message
 70  
      */
 71  
     public EnforcerRuleException( Object source, String shortMessage, String longMessage )
 72  
     {
 73  0
         super( shortMessage );
 74  0
         this.source = source;
 75  0
         this.longMessage = longMessage;
 76  0
     }
 77  
 
 78  
     /**
 79  
      * Construct a new <code>EnforcerRuleException</code> exception wrapping
 80  
      * an underlying <code>Exception</code> and providing a
 81  
      * <code>message</code>.
 82  
      *
 83  
      * @param message the message
 84  
      * @param cause the cause
 85  
      */
 86  
     public EnforcerRuleException( String message, Exception cause )
 87  
     {
 88  0
         super( message, cause );
 89  0
     }
 90  
 
 91  
     /**
 92  
      * Construct a new <code>EnforcerRuleException</code> exception wrapping
 93  
      * an underlying <code>Throwable</code> and providing a
 94  
      * <code>message</code>.
 95  
      *
 96  
      * @param message the message
 97  
      * @param cause the cause
 98  
      */
 99  
     public EnforcerRuleException( String message, Throwable cause )
 100  
     {
 101  0
         super( message, cause );
 102  0
     }
 103  
 
 104  
     /**
 105  
      * Construct a new <code>EnforcerRuleException</code> exception providing
 106  
      * a <code>message</code>.
 107  
      *
 108  
      * @param message the message
 109  
      */
 110  
     public EnforcerRuleException( String message )
 111  
     {
 112  0
         super( message );
 113  0
     }
 114  
 }