01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: AddTaskErrorException.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.scheduler.taskmanagers.exceptions;
09:
10: import com.uwyn.rife.database.exceptions.DatabaseException;
11: import com.uwyn.rife.scheduler.Task;
12: import com.uwyn.rife.scheduler.exceptions.TaskManagerException;
13:
14: public class AddTaskErrorException extends TaskManagerException {
15: private static final long serialVersionUID = -7352228624354115586L;
16:
17: private Task mTask = null;
18:
19: public AddTaskErrorException(Task task) {
20: this (task, null);
21: }
22:
23: public AddTaskErrorException(Task task, DatabaseException cause) {
24: super ("Error while adding task with id '" + task.getId()
25: + "', type '" + task.getType() + "', planned '"
26: + task.getPlanned() + "' and frequency '"
27: + task.getFrequency() + "'.", cause);
28:
29: mTask = task;
30: }
31:
32: public Task getTask() {
33: return mTask;
34: }
35: }
|