I'm fairly new to programming and I'm trying to figure out how I can throw custom exceptions. I'm trying to parse a decimal value off of an XML node and checking if it is less than 0. I want it to throw a message if the value <= 0. In all other cases, I want to throw a default exception message.
Something like this:
Parse the node
If node is nothing or contains nothing,
throw exception ("cant be blank")
else
try
decimalValue =decimal.parse(node)
If decimalValue < 0
then throw custom exception message
End If
catch
default exception