Opc data Access Automation Specification



Download 1,93 Mb.
Pdf ko'rish
bet102/107
Sana03.01.2022
Hajmi1,93 Mb.
#317185
1   ...   99   100   101   102   103   104   105   106   107
Bog'liq
OPC DA Auto 2.02 Specification

Watching for Errors

 

An error trap is enabled when Visual Basic executes the On Error statement, which specifies an error handler. 



The error trap remains enabled while the procedure containing it is active — that is, until an Exit Sub, Exit 

Function, Exit Property, End Sub, End Function, or End Property statement is executed for that procedure.  

To set an error trap that jumps to an error-handling routine, use a On Error GoTo 

line

 statement, where 



line

 

indicates the label identifying the error-handling code. 



 

Handling the Errors

 

The first step in writing an error-handling routine is adding a line label to mark the beginning of the error 



handling routine. The line label should have a descriptive name and must be followed by a colon.  

The body of the error handling routine contains the code that actually handles the error, usually in the form of 

a Case or If…Then…Else statement. You need to determine which errors are likely to occur and provide a 

course of action for each. 

The Number property of the Err object contains a numeric code representing the most recent run-time error.  

The error number from the Number property on the Err object contains the value that you would call 

GetErrorString with to covert the error number into a readable string.

 


Download 1,93 Mb.

Do'stlaringiz bilan baham:
1   ...   99   100   101   102   103   104   105   106   107




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish