summaryrefslogtreecommitdiff
path: root/test-genrandom.c
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-08-03 02:00:37 -0400
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-08-19 03:42:41 -0400
commit8acb3297f34fd04bb8f3a35ace3667b59236286e (patch)
treefbe09a1eaa3140ce4756081d02f63c73f9885967 /test-genrandom.c
parentAllow frontends to bidirectionally communicate with fast-import (diff)
downloadtgif-8acb3297f34fd04bb8f3a35ace3667b59236286e.tar.xz
Generate crash reports on die in fast-import
As fast-import is quite strict about its input and die()'s anytime something goes wrong it can be difficult for a frontend developer to troubleshoot why fast-import rejected their input, or to even determine what input command it rejected. This change introduces a custom handler for Git's die() routine. When we receive a die() for any reason (fast-import or a lower level core Git routine we called) the error is first dumped onto stderr and then a more extensive crash report file is prepared in GIT_DIR. Finally we exit the process with status 128, just like the stock builtin die handler. An internal flag is set to prevent any further die()'s that may be invoked during the crash report generator from causing us to enter into an infinite loop. We shouldn't die() from our crash report handler, but just in case someone makes a future code change we are prepared to gaurd against small mistakes turning into huge problems for the end-user. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'test-genrandom.c')
0 files changed, 0 insertions, 0 deletions