Chromium Code Reviews| Index: tools/render_pdfs_main.cpp |
| =================================================================== |
| --- tools/render_pdfs_main.cpp (revision 7895) |
| +++ tools/render_pdfs_main.cpp (working copy) |
| @@ -16,6 +16,10 @@ |
| #include "PdfRenderer.h" |
| #include "picture_utils.h" |
| +#ifdef SK_BUILD_FOR_WIN32 |
| +#include "win_dbghelp.h" |
| +#endif |
| + |
| /** |
| * render_pdfs |
| * |
| @@ -207,9 +211,8 @@ |
| } |
| } |
| -int tool_main(int argc, char** argv); |
| -int tool_main(int argc, char** argv) { |
| - |
| +int tool_main_core(int argc, char** argv); |
| +int tool_main_core(int argc, char** argv) { |
| SkAutoGraphics ag; |
| SkTArray<SkString> inputs; |
| @@ -232,6 +235,23 @@ |
| return 0; |
| } |
| +int tool_main(int argc, char** argv); |
| +int tool_main(int argc, char** argv) { |
|
borenet
2013/02/28 20:28:19
Why not put this in main() rather than adding anot
edisonn
2013/03/07 19:25:03
compiler does not like try with all that code
d:\
|
| +#ifdef SK_BUILD_FOR_WIN32 |
| + setUpDebuggingFromArgs(argv[0]); |
| + __try { |
| +#endif |
| + return tool_main_core(argc, argv); |
| +#ifdef win |
| + } |
| + __except(GenerateDumpAndPrintCallstack(GetExceptionInformation())) |
| + { |
| + SkDebugf("Exception found, please inspect the minidump for more information.\n"); |
| + } |
| + return 0; |
| +#endif |
| +} |
| + |
| #if !defined SK_BUILD_FOR_IOS |
| int main(int argc, char * const argv[]) { |
| return tool_main(argc, (char**) argv); |