exceptions to handle ItemNotSet

Mar 9, 2008 at 6:29 AM
Just wondering why an exception was used in this case and not either returning a null value or using a boolean indicator.

my reason for questioning this is because (so far) using vb.net handling the exception for an ItemNotSet does not return to executing the next line after where the error occured.

text1.text = Character.equip.head.id <--- this will have nothing set according to the armory for this example
text2.text = Character.equip.neck.id
catch ex as ItemNotSetException
end try

in this example the first line for text1 will throw the error, and the second line for text2 will not execute, it exits from the sub that had the error.

im not sure if its an issue with using code like above or not, but it seems you chose this path for your code for a reason so im wondering what you have done to overcome this issue?

multiple try statements is extra bulk that i do not want to go into either.