The following code leads to an exception if “Automatically poll for output after execution” is enabled:
BEGIN
dbms_output.put_line( LPAD( ‘’, 10000, ‘’ ) );
dbms_output.put_line( LPAD( ‘’, 10000, ‘’ ) );
END;
Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 39
I guess you should use LENGTHB instead of LENGTH for the checks.