int actualEndLine = 100;
int actualEndColumn = 99;
// Search for a SqlParseException -- with its position set -- somewhere
// in the stack.
MdxParseException mpe = null;
for (Throwable x = ex; x != null; x = x.getCause()) {
if ((x instanceof MdxParseException)
&& (((MdxParseException) x).getRegion() != null))
{
mpe = (MdxParseException) x;
break;
}
if (x.getCause() == x) {
break;
}
}
if (mpe != null) {
final ParseRegion region = mpe.getRegion();
actualLine = region.getStartLine();
actualColumn = region.getStartColumn();
actualEndLine = region.getEndLine();
actualEndColumn = region.getEndColumn();
actualException = mpe;