CN105573897A - 一种基于Delphi捕获系统异常的方法 - Google Patents

一种基于Delphi捕获系统异常的方法 Download PDF

Info

Publication number
CN105573897A
CN105573897A CN201410529398.8A CN201410529398A CN105573897A CN 105573897 A CN105573897 A CN 105573897A CN 201410529398 A CN201410529398 A CN 201410529398A CN 105573897 A CN105573897 A CN 105573897A
Authority
CN
China
Prior art keywords
screenshot
delphi
application system
file
based method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410529398.8A
Other languages
English (en)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZHENJIANG DINGTUO TECHNOLOGY INFORMATION Co Ltd
Original Assignee
ZHENJIANG DINGTUO TECHNOLOGY INFORMATION Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZHENJIANG DINGTUO TECHNOLOGY INFORMATION Co Ltd filed Critical ZHENJIANG DINGTUO TECHNOLOGY INFORMATION Co Ltd
Priority to CN201410529398.8A priority Critical patent/CN105573897A/zh
Publication of CN105573897A publication Critical patent/CN105573897A/zh
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明属于计算机应用系统数据库技术领域,本发明属于计算机应用领域,是基于DELLPHI语言下的捕获系统异常的方法,此方法能及时的把应用系统出错的信息保存下来并及时截图并保存在相对应的目录中,也可以保存在数据库中或者通过网络发给其他AppServer处理,以分析故障原因,及时的排除故障。此方法做成通用的动态连接库后能广泛嵌入应用系统中。

Description

一种基于Delphi捕获系统异常的方法
技术领域
本发明属于计算机语言应用领域,是基于DELLPHI语言下的捕获系统异常的方法,此方法可以把应用系统所出错的信息保存下来并截取出错图片并通过邮件发送到服务者中,此方法可广泛应用所有的开发人员,方便了系统服务人员的工作,提高了工作效率。
背景技术
在计算机里,由于应用系统在运行时发生许多不可意想的事情,由于使用人员无法解决在请求服务人员时,错误信息无法及时保存下来,而遭成信息不及时给服务人员或开发人员一定的难度,因此发明此方法,此方法能及时的把应用系统出错的信息保存下来并及时截图并保存在相对应的目录中,也可以保存在数据库中或者通过网络发给其他AppServer处理,以分析故障原因,及时的排除故障。此方法做成通用的动态连接库后能广泛嵌入应用系统中。
发明内容
此方法的发现主要运用DELPHI中存储文件类、图片存储机制、屏幕截取类来解决此方法。
首先先定义五个文件STRING变量和一个内容MemoryStream变量,五个STRING变量是错误文件名、日记文件记录,错误图片文件名,及日期变量名。
此方法在运行时先判明是否有错误日记文件,如果没有由创建此文件,如果存在则往文件中写入错误信息。此文件准确无误记录错误的信息和图片保存的名称及位置,根据此文件记录的信息可找到其截取的图片。
图片的截图是由DELPHI自带的内存变量进行的,此主要是通过JPG类来操作其主要定义如下:
var
scrWidth,scrHeight:integer;
DC:hDC;
FBitmap:TBitmap;
FJPEGImage:TJPEGImage;
begin
DC:=GetDC(0);
FBitmap:=TBitmap.Create;
FJPEGImage:=TJPEGImage.Create;
try
scrWidth:=Screen.Width;
scrHeight:=Screen.Height;
FBitmap.Width:=scrWidth;
FBitmap.Height:=scrHeight;
BitBlt(FBitmap.Canvas.Handle,0,0,scrWidth,scrHeight,DC,0,0,SRCCOPY);
FJPEGImage.Assign(FBitmap);
FJPEGImage.CompressionQuality:=75;
FJPEGImage.Compress;
AStream.Clear;
FJPEGImage.SaveToStream(AStream);
AStream.Position:=0;
finally
FBitmap.Free;
FJPEGImage.Free;
ReleaseDC(0,DC);
end;
此方法很简单的截获图片并保存到相对应的目录中。

Claims (4)

1.一种基于捕获系统异常的方法,特征在于采用下列步骤:
由于此方法需要运用到其文件存储、图片截获及保存D类。
2.根据权利1的要求,则设置方法中的变量ErrorFile、FileName、title,MyDateString及AStream。
3.根据权利2的要求,赋值于变量中并执行保存特定的文件。
4.根据权利3的要求,特定的文件自动发给指定的EMAIL邮箱。
CN201410529398.8A 2014-10-10 2014-10-10 一种基于Delphi捕获系统异常的方法 Pending CN105573897A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410529398.8A CN105573897A (zh) 2014-10-10 2014-10-10 一种基于Delphi捕获系统异常的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410529398.8A CN105573897A (zh) 2014-10-10 2014-10-10 一种基于Delphi捕获系统异常的方法

Publications (1)

Publication Number Publication Date
CN105573897A true CN105573897A (zh) 2016-05-11

Family

ID=55884063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410529398.8A Pending CN105573897A (zh) 2014-10-10 2014-10-10 一种基于Delphi捕获系统异常的方法

Country Status (1)

Country Link
CN (1) CN105573897A (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11436713B2 (en) 2020-02-19 2022-09-06 International Business Machines Corporation Application error analysis from screenshot

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11436713B2 (en) 2020-02-19 2022-09-06 International Business Machines Corporation Application error analysis from screenshot

Similar Documents

Publication Publication Date Title
CN110347746B (zh) 一种异构数据库同步数据一致性校验方法及装置
US9037555B2 (en) Asynchronous collection and correlation of trace and communications event data
US8560502B2 (en) Method and a system for replaying database workload with transactional consistency
CN102902558B (zh) 项目脚本文件更新系统和方法、脚本文件合并方法和装置
CN105205154B (zh) 数据迁移方法以及装置
CN111563130A (zh) 一种基于区块链技术的数据可信数据治理方法和系统
CN108737549A (zh) 一种大数据量的日志分析方法及装置
US20170199903A1 (en) System for backing out data
CN102497427A (zh) 实现可再生能源监测系统数据采集服务的方法和装置
CN102479113A (zh) 异常自适应处理方法及系统
CN105868056B (zh) 获取Windows虚拟机中已删除文件的方法、装置及安全虚拟机
US8825824B2 (en) Systems and methods for machine configuration
CN105653401A (zh) 应用系统灾备、运维、监控和应急启停调度方法及装置
US9164872B2 (en) Tracking of program objects during request processing
CN110704381A (zh) 数据解析方法、装置及存储介质
CN111737128A (zh) 线上测试方法及灰度分流设备、存储介质
WO2015131643A1 (zh) 软件检测方法及装置
CN105227379A (zh) 一种针对java web 应用的集中监控和预警方法
CN110798445A (zh) 公共网关接口测试方法、装置、计算机设备及存储介质
CN106547861A (zh) 一种智能管理机器节点的数据库的方法及装置
CN103368970B (zh) 一种针对网络目标的自动化安全检测方法
CN103927182A (zh) 一种利用屏幕截屏结合鼠标键盘操作进行录像的方法
Murugesan et al. Audit log management in MongoDB
CN105573897A (zh) 一种基于Delphi捕获系统异常的方法
CN106789335B (zh) 一种用于处理信息的方法和系统

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160511

WD01 Invention patent application deemed withdrawn after publication