public virtual System.String getConstraintMessage(EvaluationContext ec, FormInstance instance, System.String textForm) { if (xPathConstraintMsg == null) { //If the request is for getting a constraint message in a specific format (like audio) from //itext, and there's no xpath, we couldn't possibly fulfill it return(textForm == null?constraintMsg:null); } else { if (textForm != null) { ec.OutputTextForm = textForm; } try { System.Object value_Renamed = xPathConstraintMsg.eval(instance, ec); if (value_Renamed != (System.Object) "") { return((System.String)value_Renamed); } return(null); } catch (System.Exception e) { Logger.exception("Error evaluating a valid-looking constraint xpath ", e); return(constraintMsg); } } }
private void InitBlock() { try { List <Object> pivots = new List <Object>(); this.pivot(model, evalContext, pivots, evalContext.getContextRef()); return(pivots); } catch (UnpivotableExpressionException uee) { //Rethrow unpivotable (expected) throw uee; } catch (System.Exception e) { //Pivots aren't critical, if there was a problem getting one, log the exception //so we can fix it, and then just report that. Logger.exception(e); //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" throw new UnpivotableExpressionException(e.Message); } return(eval(model, evalContext)); }