::::::::::::::::::::::::::::::::::::::::
:: Error Handling For Outlook Module. ::
::::::::::::::::::::::::::::::::::::::::
::set vers=v7.9.9.02
:err2
set /a goat=7
if %e% lss 0 set /a e=0
if %e% equ 0 echo %l2%
if %e% equ 0 goto return
:: Fatal Exceptions Defined:
if %e% equ 1 echo **** Source Files NOT Found.
if %e% equ 2 echo **** Destination Files NOT Found.
if %e% equ 3 echo **** Error while copying Source to Destination:
if %e% equ 3 set /a exit2=1
::
if %e% lss 4 goto fadal
:: Non-Fatal exc-Eptions Handled:
set m="ERROR!"
set /a exc=0
if %e% equ 4 set /a exc=1
if %e% equ 4 set m=**** Daddio-PC not currently online.
if %e% equ 6 set /a exc=2
if %e% equ 6 set m= **** Backup1 (I:) is not currently online.
if %e% equ 8 set /a exc=3
if %e% equ 8 set m= **** Seagate7 (X:) is not currently online.
if %e% equ 10 set /a exc=4
if %e% equ 10 set m=**** Gurujimon not currently online.
if %e% equ 13 set /a exc=5
if %e% equ 13 set m=**** Daddio-PC not currently online.
if %e% equ 16 set /a exc=6
if %e% equ 16 set m= **** Seagate1 (H:) is not currently online.
if %e% equ 18 set /a exc=7
if %e% equ 18 set m= **** Seagate16 (U:) is not currently online.
if %exc% gtr 0 if %exc% leq 7 goto nfadal
:: Nearly-Fatal Exceptions Handled:
if %e% equ 5 set /a exc=8
if %e% equ 5 set m=**** Error while Copying to Daddio from Source.
if %e% equ 7 set /a exc=9
if %e% equ 7 set m=**** Error while Copying to Backup1 from Source.
if %e% equ 9 set /a exc=10
if %e% equ 9 set m=**** Error while Copying to Seagate7 from Source.
if %exc% gtr 0 if %exc% leq 10 goto nfadal
if %e% equ 11 set /a exc=11
if %e% equ 11 set m= **** Error Copying from D: to Gurujimon.
if %e% equ 12 set /a exc=12
if %e% equ 12 set m= **** Error Copying from Gurujimon to Daddio.
if %e% equ 14 set /a exc=13
if %e% equ 14 set m= **** Error Copying back from Daddio to Source.
if %e% equ 17 set /a exc=14
if %e% equ 17 set m= **** Error Copying to Seagate1 from Source.
if %e% equ 19 set /a exc=15
if %e% equ 19 set m= **** Error Copying to Seagate16 from Source.
:: The next 4 lines probably won't get hit,
:: but are logical & implicitely inferential.
if %e% lss 0 goto fadal
if %e% gtr 19 goto fadal
if %exc% lss 0 goto fadal
if %exc% gtr 16 goto fadal
:: LAST CHANCEs fir ALL FATAL-ERoS...
:: Save for these, for they were forgiven!
:nfadal
echo %sl%
echo ******* EXCEPTION: #%exc% *******
echo %sl%
echo %m% ****
echo %sl%
echo .
echo %sl%
echo *** Non-Fatal Program Continuing... ***
echo %sl%
echo .
::
set /a e=0
:: e ^ grants a reprieve for these non-fatal eros
set /a goat=6
goto return
:fadal
set /a goat=7
echo %l1%
REM echo .
echo %time%
echo **** A Fatal Error Has Occurred! ****
echo .
echo %l2%
set msg="Recommended Pause and Investigate? (y/N): "
choice /c yn /n /t 90 /d n /m %msg%
if %errorlevel% neq 1 echo %l2% & goto return
echo %l1%
echo **
:: THIS PAUSE IS PROGRAMATIC, NOT JUST TE$TCODE! KEEP
pause
echo **
pause
echo **
:return
::: 100% -JpE- 20221218195021
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎