1 24 package org.riotfamily.revolt; 25 26 import java.io.PrintStream ; 27 import java.io.PrintWriter ; 28 29 32 public class EvolutionInstructions extends RuntimeException { 33 34 private String instructions; 35 36 private boolean printed; 37 38 public EvolutionInstructions(String instructions) { 39 super("The database schema is not up-to-date"); 40 this.instructions = instructions; 41 } 42 43 public void printStackTrace(PrintStream s) { 44 if (!printed) { 45 s.print(instructions); 46 printed = true; 47 } 48 else { 49 s.print("\t... see above"); 50 } 51 } 52 53 public void printStackTrace(PrintWriter s) { 54 if (!printed) { 55 s.print(instructions); 56 printed = true; 57 } 58 else { 59 s.print("\t... see above"); 60 } 61 } 62 63 } 64 | Popular Tags |