1 23 24 package org.objectweb.dream.control.activity.task; 25 26 import org.objectweb.fractal.api.control.NameController; 27 28 31 public class NoSuchTaskException extends Exception 32 { 33 34 Task task; 35 36 39 public NoSuchTaskException(Task task) 40 { 41 this.task = task; 42 } 43 44 48 public NoSuchTaskException(Task task, String message) 49 { 50 super(message); 51 this.task = task; 52 } 53 54 57 public Task getTask() 58 { 59 return task; 60 } 61 62 65 public String toString() 66 { 67 if (task != null && task instanceof NameController) 68 { 69 return super.toString() + " task name : " 70 + ((NameController) task).getFcName(); 71 } 72 return super.toString(); 73 } 74 } | Popular Tags |