Err Function [Runtime]/text/sbasic/shared/03050200.xhpSun Microsystems, Inc.converted from old format - fpeErr functionErr Function [Runtime]Returns an error code that identifies the error that occurred during program execution.Syntax:ErrReturn value:IntegerParameters:The Err function is used in error-handling routines to determine the error and the corrective action.Example:sub ExampleErroron error goto ErrorHandler REM Set up error handlerDim iVar as IntegerDim sVar As StringREM Error occurs due to non-existent fileiVar = FreefileOpen "\file9879.txt" for Input as #iVarLine Input #iVar, sVarClose #iVarexit subErrorHandler:MsgBox "Error " & Err & ": " & Error$ + chr(13) + "At line : " + Erl + chr(13) + Now , 16 ,"an error occurred"end sub