@Test public void testConstructor() { String pattern = "test"; StringException x = new StringException(pattern); assertTrue(pattern.equals(x.toString())); }
public String toString() { if (this.patt == null) return "Error: The pattern cannot be empty"; else return this.patt; }
StringException extends Exception { public String toString() { if (this.patt == null) return "Error: The pattern cannot be empty"; else return this.patt; } }
StringException extends Exception { public String toString() { if (this.patt == null) return "Error: The pattern cannot be empty"; else return this.patt; } StringException();  StringException(String pattern); }
StringException extends Exception { public String toString() { if (this.patt == null) return "Error: The pattern cannot be empty"; else return this.patt; } StringException();  StringException(String pattern); String toString(); }
StringException extends Exception { public String toString() { if (this.patt == null) return "Error: The pattern cannot be empty"; else return this.patt; } StringException();  StringException(String pattern); String toString();  }