Toad World® Forums

Raise exception and NUMBER data type


#1

Two problems happened in my testing process. I checked the help docs and forum lists, but didn’t find helpful information. I posted the problem here and ask for your help.

1 In the code procedure, there are some code like this:

RowExists EXCEPTION;
PRAGMA EXCEPTION_INIT(RowExists, -00001);

I would like to verify whether this exception could be thrown out, I defined a test case and running it but failed. Does this kind of exception can’t be tested?

2 In my test case definition, I have an input of Number(Number data type, the size was defined as 20) like this, 9223090561878066167, I define the output to query whether this value has been updated in the table. But after the execution, the value inserted into the table became to 9223090561878070000. Is there any place I can define to not allow this automatic ROUND happens?

Very appreciate your any assistance.

Thanks.

YY


#2
  1. In the outcome grid, create an outcome based on the exception type. This should be clearly visible either on the first page of the wizard or in the drop down of the top left field in the grid itself. Also check out this topic in Help:

Quick Start Tutorials -> Test for Exceptions

  1. This is a bug. I have documented it and we will fix it for the next release (post 1.8.2, which is already in code freeze and available in a couple of weeks). But there is a workaround: Paste your very long value into the field in the input grid and then check the Expr (Expression) box. It will then NOT be rounded up.

#3

Thank you very much for your help. :slight_smile: