How do I build the parameters so that my program can catch errors such as:
-Transactional code only the codes D and P - are permitted
-Transaction ammount - only double values are permitted
-Account number - only specific 6 digit account numbers are valid
(All of the above come up on the same line, and update periodically)
So there will be multiple lines, which method can I use to determine which line the error is on and the error at hand as well.
You could throw an exception and catch it, assert it, or use if statements.
@giblit, I'm very new could you elaborate a bit more please, I have no idea where to start
I have an idea of catching the different errors but, I don't know how I'd catch them at the line in which they occur.
Last edited on