public static FormulaError forString(String code) throws IllegalArgumentException {FormulaError err = smap.get(code);if(err == null) throw new IllegalArgumentException("Unknown error code: " + code);return err;}

public static FormulaError ForString(String code){if (smap.ContainsKey(code))return smap[code];throw new ArgumentException("Unknown error code: " + code);}
