Added logic to handle errors if the Range location cannot be found from the To location. This corrects range type transitions (AND type) which extend to the last sibling of the To location.
This commit is contained in:
parent
891615bbc1
commit
779670e70d
@ -32,9 +32,19 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
public string ResolvePathTo(FormatInfo fi, ItemInfo itminfo, int tranType, ItemInfo toitem, ItemInfo rangeitem)
|
||||
{
|
||||
try
|
||||
{
|
||||
return TransitionText.GetResolvedText(fi, itminfo, tranType, toitem, rangeitem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (tranType == 2 && ex.Message == "Cannot find Next Item")
|
||||
return TransitionText.GetResolvedText(fi, itminfo, tranType, toitem, toitem);
|
||||
_MyLog.Error("Error Processing Transition Text", ex);
|
||||
return "(Resolved Transition Text)";
|
||||
}
|
||||
}
|
||||
public string ResolvePathTo()
|
||||
{
|
||||
MyContent.RefreshContentItems();
|
||||
@ -788,7 +798,10 @@ namespace VEPROMS.CSLA.Library
|
||||
if (rangeAncestors.ContainsKey(next.ItemID))
|
||||
return rangeAncestors[next.ItemID];
|
||||
while (next.NextItem == null)
|
||||
{
|
||||
next = next.ActiveParent as ItemInfo;
|
||||
if(next == null) throw(new Exception("Cannot find Next Item"));
|
||||
}
|
||||
return next.NextItem;
|
||||
}
|
||||
private static bool AddOptionalTranGetSectionHdr(TransitionBuilder tb)
|
||||
|
Loading…
x
Reference in New Issue
Block a user