当前位置:网站首页>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
边栏推荐
- 为什么要分布式 id ?分布式 id 生成方案有哪些?
- Subclass a inherits from parent class B, a a = new a(); Then the execution sequence of the constructor of parent class B, the static code block of parent class B, the non static code block of parent c
- Comparison between relu and SIGMOD
- Evaluating the overall situation of each class in a university based on entropy weight method (formula explanation + simple tool introduction)
- How TCP handles exceptions during three handshakes and four waves
- 如何实现移动端富文本编辑器功能
- C disk uses 100% cleaning method
- Comparator(用于Arrays.sort)
- Is it safe to open a stock account on your mobile phone? Who can I open an account with?
- 牛客网:旋转数组
猜你喜欢
分享7个神仙壁纸网站,让新的壁纸,给自己小小的雀跃,不陷入年年日日的重复。
Nacos installation and use
TCP如何处理三次握手和四次挥手期间的异常
CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
CMU提出NLP新范式—重构预训练,高考英语交出134高分
Idea uses the fast request interface for debugging
云原生数据湖以存储、计算、数据管理等能力通过信通院评测认证
Eureka accesses the console and reports an error: whitelabel error page
Two ways of redis persistence -- detailed explanation of RDB and AOF
Source code analysis of AQS & reentrantlock
随机推荐
Use of comparable (for arrays.sort)
9 cases where elements cannot be located
C disk uses 100% cleaning method
Sword finger offer II 091 Painting house: application of state machine DP
依概率收敛
基于OpenStreetMap+PostGIS的地理位置系统 论文文档+参考论文文献+项目源码及数据库文件
基于超算平台气象预警并行计算架构研究
GC
Niuke: rotation array
时创能源冲刺科创板:拟募资11亿 年营收7亿净利反降36%
SQL注入漏洞(类型篇)
Translation of meisai C topic in 2022 + sharing of ideas
Two ways of redis persistence -- detailed explanation of RDB and AOF
Redis6笔记02 配置文件,发布和订阅,新数据类型,Jedis操作
金太阳教育美股上市:市值3.6亿美元 成小盘中概股
2022 PMP project management examination agile knowledge points (2)
Geographic location system based on openstreetmap+postgis paper documents + reference papers + project source code and database files
How to realize the rich text editor function of mobile terminal
4 life distributions
Specific meanings of node and edge in Flink graph