1 28 package org.jvyamlb; 29 30 34 public class ScannerException extends YAMLException { 35 private String when; 36 private String what; 37 private String note; 38 39 public ScannerException(final String when, final String what, final String note) { 40 super("ScannerException " + when + " we had this " + what); 41 this.when = when; 42 this.what = what; 43 this.note = note; 44 } 45 46 public ScannerException(final Throwable thr) { 47 super(thr); 48 } 49 50 public String toString() { 51 final StringBuffer lines = new StringBuffer (); 52 if(this.when != null) { 53 lines.append(this.when).append("\n"); 54 } 55 if(this.what != null) { 56 lines.append(this.what).append("\n"); 57 } 58 if(this.note != null) { 59 lines.append(this.note).append("\n"); 60 } 61 lines.append(super.toString()); 62 return lines.toString(); 63 } 64 } | Popular Tags |