开发者

How to catch exe crashes from command line

I'm doing batch-testing on our win32 c++ programs. Some of them crash. What's the best way to catch those crash from the command line and report it?

thanks

edit: answer:

1) you can't catch another process's exception from 开发者_如何学JAVAbatch / command line

2) example to do it right in c#:

How to handle a crash in a process launched via System.Diagnostics.Process?


There is a way of catching exceptions and crashes from the command line: use ADPlus in crash mode and it will sit in the background listening for unhandled exceptions.

See also Win32: Is there a difference between Dr. Watson's full/mini dumps and writing my own?


Maybe checking their return value in your script ? Of course, they have to adhere to a standard (for instance, in a unix-like os 0 = success, all else = error).

EDIT: also look here


there are two ways to catch, 1. Have a monitoring exe running as service or process. 2. Or implement crash class in windows may be usefull

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜