public OwsException(V100.Types.Exception ex): this(_GetExceptionCode(ex), _GetExceptionText(ex)) { Debug.Assert(ex!=null); Locator=ex.locator; }
private static OwsExceptionCode _GetExceptionCode(V100.Types.Exception ex) { if ((ex==null) || string.IsNullOrEmpty(ex.exceptionCode)) return OwsExceptionCode.NoApplicableCode; return (OwsExceptionCode)Enum.Parse(typeof(OwsExceptionCode), ex.exceptionCode, false); }
private static string _GetExceptionText(V100.Types.Exception ex) { if ((ex==null) || (ex.ExceptionText==null)) return null; return string.Join("\n", ex.ExceptionText); }