当前位置:网站首页>How terrible is it not to use error handling in VFP?
How terrible is it not to use error handling in VFP?
2022-06-25 11:43:00 【VFP of Garfield】

2020
Error handling
Most people get it wrong . I don't know when , We started the forum to download the so-called error handler , Add it to the main function . This so-called handler , Is constantly popping up error prompt dialog boxes , Such error handling , No errors have been handled at all , The only thing to do is to keep popping windows . Better not .
1 Error handling , Is to solve the error
Program error , Catch errors , And stop executing the original program , Go to error handling , For example, the file is occupied , Let's try again if we can open , Can open the , We did it quietly , Or high-profile solution for users .
2 Error handling , If it cannot be solved, it must be reported
Program error , Catch errors , And stop executing the original program , Go to error handling , But the program cannot be restored , That is to exit the main program , And start the error sending interface , Put environmental information , Collect the error information , Write a blog or send an email to the developer .
Here are some error sending programs for foreigners , I made a fine adjustment
There are four documents in it , Put them in your software directory
errorhandler.prg
issues.scx
issues.sct
myfll.fll
3 Load the following code in your main function
*-- Running environment
If !Inlist(_vfp.StartMode,0)
Close All
*!* Error handling
On Error Do ErrorHandler With Error( ), ;
Message( ), ;
Message(1), ;
Program( ), ;
Lineno(1),;
" Qiyou food safety system "
Endif
That's how it works OK Well , We actively trigger an error in the main function , Let's see the effect

I received the message in my email

边栏推荐
- Detailed explanation of spark specification
- try-catch-finally
- redis的dict的扩容机制(rehash)
- Shichuang Energy sprint Technology Innovation Board: le chiffre d'affaires annuel prévu de 1,1 milliard de RMB est de 0,7 milliard de RMB, en baisse de 36%
- CFCA Anxin sign access
- 牛客网:主持人调度
- Kingbasees plug-in ftutilx of Jincang database
- Flink partition policy
- Countdownlatch source code analysis
- Why distributed IDS? What are the distributed ID generation schemes?
猜你喜欢

Shichuang energy rushes to the scientific innovation board: it plans to raise 1.1 billion yuan, with an annual revenue of 700million yuan and a 36% decrease in net profit

西山科技冲刺科创板:拟募资6.6亿 郭毅军夫妇有60%表决权

Eureka accesses the console and reports an error: whitelabel error page

为什么要分布式 id ?分布式 id 生成方案有哪些?

ThingsPanel 发布物联网手机客户端(多图)

记一次给OpenHarmony提交代码的过程

CFCA Anxin sign access

4 life distributions

ThingsPanel 發布物聯網手機客戶端(多圖)

redis的dict的扩容机制(rehash)
随机推荐
Whole process of web page request
开哪家证券公司的账户是比较好,比较安全的
现在网上炒股开户身份证信息安全吗?
Use of JSP sessionscope domain
按钮多次点击造成结果
Database Series: MySQL index optimization summary (comprehensive version)
2022 mathematical modeling competition time and registration fee
An interesting logic SRC mining
记一次有趣的逻辑SRC挖掘
Yisheng biological sprint scientific innovation board: 25% of the revenue comes from the sales of new crown products, and it is planned to raise 1.1 billion yuan
時創能源沖刺科創板:擬募資11億 年營收7億淨利反降36%
记一次给OpenHarmony提交代码的过程
Where do the guests come from
ThingsPanel 發布物聯網手機客戶端(多圖)
SQL injection vulnerability (type chapter)
How to use the markdown editor
Countdownlatch source code analysis
Record the process of submitting code to openharmony once
Simple use of stream (II)
SQL injection vulnerability (bypass)