Strange expression binding error

I am using a Row selector output as the data input to a table. I am then using a property with the expression:

{Root}[0, “batch_num”]

The purpose of this is to retrieve a single relevant cell from the database for use as an input in another row selector. While the property reads the correct value I am continually receiving an error:

Exception: Error executing expression binding on
Main Window.Root Container.Numeric Label.value
caused by IndexOutOfBoundsException: Index: 0, Size: 0

Ignition v7.1.7 (b6048)
Java: Sun Microsystems Inc. 1.6.0_22

Is there a method of catching an error? How would I go about fixing this problem?

Problem solved:

[code]if({Root Container.Table.selectedRow} = -1,

"", // this is the fail case

{Root}[{Root Container.Table.selectedRow}, "BATCH_NUM"])[/code]

Indeed, this is such a common pattern that the solution is in the user manual.