Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKLOG-23233] - Calculator step : throw exception on non existing f…
…iles
- Loading branch information
Showing
13 changed files
with
947 additions
and
99 deletions.
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
core/src/main/java/org/pentaho/di/core/exception/KettleFileNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/*! ****************************************************************************** | ||
* | ||
* Pentaho Data Integration | ||
* | ||
* Copyright (C) 2018 by Hitachi Vantara : http://www.pentaho.com | ||
* | ||
******************************************************************************* | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
******************************************************************************/ | ||
|
||
package org.pentaho.di.core.exception; | ||
|
||
/** | ||
* Exception thrown when a files does not exists | ||
*/ | ||
public class KettleFileNotFoundException extends KettleFileException { | ||
|
||
private String filepath; | ||
|
||
public String getFilepath() { | ||
return filepath; | ||
} | ||
|
||
public void setFilepath( String filepath ) { | ||
this.filepath = filepath; | ||
} | ||
|
||
public KettleFileNotFoundException() { | ||
super(); | ||
} | ||
|
||
/** | ||
* Constructs a new throwable with the specified detail message. | ||
* | ||
* @param message | ||
* - the detail message. The detail message is saved for later retrieval by the getMessage() method. | ||
*/ | ||
public KettleFileNotFoundException( String message ) { | ||
super( message ); | ||
} | ||
|
||
public KettleFileNotFoundException( String message, String filepath ) { | ||
super( message ); | ||
setFilepath( filepath ); | ||
} | ||
|
||
/** | ||
* Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) | ||
* (which typically contains the class and detail message of cause). | ||
* | ||
* @param cause | ||
* the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and | ||
* indicates that the cause is nonexistent or unknown.) | ||
*/ | ||
public KettleFileNotFoundException( Throwable cause ) { | ||
super( cause ); | ||
} | ||
|
||
/** | ||
* Constructs a new throwable with the specified detail message and cause. | ||
* | ||
* @param message | ||
* the detail message (which is saved for later retrieval by the getMessage() method). | ||
* @param cause | ||
* the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and | ||
* indicates that the cause is nonexistent or unknown.) | ||
*/ | ||
public KettleFileNotFoundException( String message, Throwable cause ) { | ||
super( message, cause ); | ||
} | ||
} |
Oops, something went wrong.