exception SoftError of string val error : string -> 'a exception HardError of string