summaryrefslogtreecommitdiffstats
path: root/private/nw/convert/nwconv/error.c
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/nw/convert/nwconv/error.c
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'private/nw/convert/nwconv/error.c')
-rw-r--r--private/nw/convert/nwconv/error.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/private/nw/convert/nwconv/error.c b/private/nw/convert/nwconv/error.c
new file mode 100644
index 000000000..d1bf87831
--- /dev/null
+++ b/private/nw/convert/nwconv/error.c
@@ -0,0 +1,69 @@
+/*
+ +-------------------------------------------------------------------------+
+ | Error Handling Routines |
+ +-------------------------------------------------------------------------+
+ | (c) Copyright 1993-1994 |
+ | Microsoft Corp. |
+ | All rights reserved |
+ | |
+ | Program : [Error.c] |
+ | Programmer : Arthur Hanson |
+ | Original Program Date : [Jul 27, 1993] |
+ | Last Update : [Jun 18, 1994] |
+ | |
+ | Version: 1.00 |
+ | |
+ | Description: |
+ | |
+ | History: |
+ | arth Jun 18, 1994 1.00 Original Version. |
+ | |
+ +-------------------------------------------------------------------------+
+*/
+
+#include "globals.h"
+
+
+/*+-------------------------------------------------------------------------+
+ | CriticalErrorExit()
+ |
+ | This should only be called when there is an unrecoverable error and
+ | the program must abort (such as running out of disk space on main
+ | system or out of memory).
+ |
+ | Can't dynamically load the error string (must do this at program
+ | init), because at time or error we might not be able to load it!
+ |
+ +-------------------------------------------------------------------------+*/
+void CriticalErrorExit(LPTSTR ErrorString) {
+ MessageBox(NULL, ErrorString, Lids(IDS_E_1), MB_ICONHAND | MB_SYSTEMMODAL | MB_OK);
+ exit(0);
+
+} // CriticalErrorExit
+
+
+
+/*+-------------------------------------------------------------------------+
+ | WarningError()
+ |
+ | Pops up a warning message to the user - this should only be used
+ | when the user must be notified of something (the program stops until
+ | the user responds), but it is not so critical the the program has to
+ | abort.
+ |
+ | An example of this is if a config file is corrupt and the program
+ | will ignore it.
+ |
+ +-------------------------------------------------------------------------+*/
+void WarningError(LPTSTR ErrorString, ...) {
+ static TCHAR tmpStr[TMP_STR_LEN_256];
+ va_list marker;
+
+ va_start(marker, ErrorString);
+ wvsprintf(tmpStr, ErrorString, marker);
+ MessageBox(NULL, tmpStr, Lids(IDS_E_2), MB_ICONHAND | MB_OK);
+ va_end(marker);
+
+} // WarningError
+
+