src: Yearly copyright bump
[quassel.git] / src / common / types.h
index d7b4404..467d9fb 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2018 by the Quassel Project                        *
+ *   Copyright (C) 2005-2019 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -169,3 +169,17 @@ QDataStream &operator>>(QDataStream &in, T &value) {
     value = static_cast<T>(v);
     return in;
 }
+
+// Exceptions
+
+/**
+ * Thrown during initialization to enforce exiting the application before the event loop is started
+ */
+struct ExitException
+{
+    int exitCode;
+    QString errorString;
+
+    ExitException(int code = EXIT_FAILURE, QString error = {})
+        : exitCode(code), errorString(std::move(error)) {}
+};