summaryrefslogtreecommitdiff
path: root/src/driver.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-06-05 20:54:52 +0000
committerglx <glx@openttd.org>2008-06-05 20:54:52 +0000
commitb60a1326bf3ea9b9e0235cf18cdcd964c758a8bf (patch)
tree62bef57de81c1ddcc691d5de5e8db395615bdacc /src/driver.cpp
parentbb758700a87b19e47c6ef7aa28280ca05badd62f (diff)
downloadopenttd-b60a1326bf3ea9b9e0235cf18cdcd964c758a8bf.tar.xz
(svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror().
Diffstat (limited to 'src/driver.cpp')
-rw-r--r--src/driver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/driver.cpp b/src/driver.cpp
index 202b84fab..6e9c2c54d 100644
--- a/src/driver.cpp
+++ b/src/driver.cpp
@@ -87,7 +87,7 @@ const Driver *DriverFactoryBase::SelectDriver(const char *name, Driver::Type typ
delete newd;
}
}
- error("Couldn't find any suitable %s driver", GetDriverTypeName(type));
+ usererror("Couldn't find any suitable %s driver", GetDriverTypeName(type));
} else {
char *parm;
char buffer[256];
@@ -125,7 +125,7 @@ const Driver *DriverFactoryBase::SelectDriver(const char *name, Driver::Type typ
const char *err = newd->Start(parms);
if (err != NULL) {
delete newd;
- error("Unable to load driver '%s'. The error was: %s", d->name, err);
+ usererror("Unable to load driver '%s'. The error was: %s", d->name, err);
}
DEBUG(driver, 1, "Successfully loaded %s driver '%s'", GetDriverTypeName(type), d->name);
@@ -133,7 +133,7 @@ const Driver *DriverFactoryBase::SelectDriver(const char *name, Driver::Type typ
*GetActiveDriver(type) = newd;
return newd;
}
- error("No such %s driver: %s\n", GetDriverTypeName(type), buffer);
+ usererror("No such %s driver: %s\n", GetDriverTypeName(type), buffer);
}
}