A script-enabled browser is required for this page to function properly.

TOOL_RES.Buffer_Overflow

Description

Raised when you tried to get a resource that was longer than the supplied buffer.

Syntax


Tool_Res.Buffer_Overflow  EXCEPTION;

Example


/*
** This example uses Tool_Res.Buffer_Overflow
*/
PRODEDURE res_buf_test IS
  resfileh   TOOL_RES.RFHANDLE;
  res1       VARCHAR2(20);
BEGIN
  /*  Open a resource file */ 
  resfileh := TOOL_RES.RFOPEN
           ('C:/resource/test.res');
  /*  Attempt to read very large string
          which overflows buffer. */
  res1 := TOOL_RES.RFREAD(resfileh,'res_1');
   ...

EXCEPTION
  WHEN TOOL_RES.BUFFER_OVERFLOW THEN
    /* print error message */
    TEXT_IO.PUT_LINE('Buffer overflow.');
    /* discard the error */
    TOOL_ERR.POP;
END;