Move INgestManagerException into ingest/IngestManager

This commit is contained in:
Richard Cordovano 2016-04-29 09:34:17 -04:00
parent 5c7fdbd466
commit eb20bba8c6
3 changed files with 30 additions and 50 deletions

View File

@ -25,10 +25,10 @@ import java.util.List;
public class IngestJobStartResult {
private final IngestJob job;
private final IngestManagerException startupException;
private final IngestManager.IngestManagerException startupException;
private final List<IngestModuleError> moduleErrors;
IngestJobStartResult(IngestJob job, IngestManagerException startupException, List<IngestModuleError> moduleErrors) {
IngestJobStartResult(IngestJob job, IngestManager.IngestManagerException startupException, List<IngestModuleError> moduleErrors) {
this.job = job;
this.startupException = startupException;
if (moduleErrors == null) {
@ -48,7 +48,7 @@ public class IngestJobStartResult {
/**
* @return the startupException, which may be null
*/
public IngestManagerException getStartupException() {
public IngestManager.IngestManagerException getStartupException() {
return startupException;
}

View File

@ -1132,4 +1132,31 @@ public class IngestManager {
}
/**
* An exception thrown by the ingest manager.
*/
public final static class IngestManagerException extends Exception {
private static final long serialVersionUID = 1L;
/**
* Creates an exception containing an error message.
*
* @param message The message.
*/
private IngestManagerException(String message) {
super(message);
}
/**
* Creates an exception containing an error message and a cause.
*
* @param message The message
* @param cause The cause.
*/
private IngestManagerException(String message, Throwable cause) {
super(message, cause);
}
}
}

View File

@ -1,47 +0,0 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011-2016 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* 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.sleuthkit.autopsy.ingest;
/**
* Encapsulates an exception thrown by an ingest module during an operation such
* as startup or shut down with an exception object for the error that occurred.
*/
public final class IngestManagerException extends Exception {
private static final long serialVersionUID = 1L;
/**
* Create exception containing the error message
*
* @param message the message
*/
IngestManagerException(String message) {
super(message);
}
/**
* Create exception containing the error message
*
* @param message the message
* @param ex cause exception
*/
public IngestManagerException(String message, Exception ex) {
super(message, ex);
}
}