1 7 package com.inversoft.error; 8 9 10 import java.util.Locale ; 11 12 import com.inversoft.util.StringTools; 13 14 15 21 public class PropertyError extends BasicError { 22 23 private String property; 24 25 26 33 public PropertyError(String property) { 34 setProperty(property); 35 } 36 37 44 public PropertyError(String property, String msg) { 45 super(msg); 46 setProperty(property); 47 } 48 49 58 public PropertyError(String property, String msg, Locale locale) { 59 super(msg, locale); 60 setProperty(property); 61 } 62 63 75 public PropertyError(String property, String msg, Object [] params, 76 Locale locale) { 77 super(msg, params, locale); 78 setProperty(property); 79 } 80 81 90 public PropertyError(String property, String msg, Object [] params) { 91 super(msg, params); 92 setProperty(property); 93 } 94 95 96 101 public String getProperty() { 102 return property; 103 } 104 105 111 public void setProperty(String property) { 112 if (StringTools.isEmpty(property)) { 113 throw new IllegalArgumentException ("A property is required for a PropertyError"); 114 } 115 116 this.property = property; 117 } 118 } 119 | Popular Tags |