View Javadoc

1   package org.codehaus.mojo.javascript.compress;
2   
3   import java.io.File;
4   
5   /*
6    * Copyright 2001-2005 The Apache Software Foundation.
7    *
8    * Licensed under the Apache License, Version 2.0 (the "License");
9    * you may not use this file except in compliance with the License.
10   * 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, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  /**
22   * Exception during compression of some JavaScript file
23   */
24  public class CompressionException extends Exception {
25  
26  	/** generated */
27  	private static final long serialVersionUID = 1282418066985382856L;
28  	
29  	/** The script that cannot be compressed */
30  	private File script;
31  	
32  	public CompressionException() {
33  		super();
34  	}
35  	
36  	public CompressionException( File script ) {
37  		super();
38  		this.script = script;
39  	}
40  
41  	public CompressionException(String message, Throwable cause, File script) {
42  		super(message, cause);
43  		this.script = script;
44  	}
45  
46  	public CompressionException(String message, File script) {
47  		super(message);
48  		this.script = script;
49  	}
50  
51  	public CompressionException(Throwable cause, File script) {
52  		super(cause);
53  		this.script = script;
54  	}
55  
56  	public File getScript() {
57  		return script;
58  	}
59  
60  }