~ubuntu-branches/ubuntu/natty/spring/natty

« back to all changes in this revision

Viewing changes to rts/System/Platform/errorhandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-09-23 18:56:03 UTC
  • mfrom: (3.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100923185603-st97s5chplo42y7w
Tags: 0.82.5.1+dfsg1-1ubuntu1
* Latest upstream version for online play
* debian/control: Replace (rather than conflict) spring-engine
  - spring-engine will be a dummy package (LP: #612905)
  - also set maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
 
2
 
1
3
/**
2
 
 * @file errorhandler.h
3
4
 * @brief error messages
4
 
 * @author Christopher Han <xiphux@gmail.com>
5
 
 * @author Tobi Vollebregt <tobivollebregt@gmail.com>
6
 
 * @author Robin Vobruba <hoijui.quaero@gmail.com>
7
 
 *
8
 
 * Error handling based on platform
9
 
 * Copyright (C) 2005.  Licensed under the terms of the
10
 
 * GNU GPL, v2 or later.
 
5
 * Platform specific error handling
11
6
 */
 
7
 
12
8
#ifndef ERRORHANDLER_H
13
9
#define ERRORHANDLER_H
14
10
 
15
11
#include <string>
16
12
 
17
 
#define MBF_OK          1
18
 
#define MBF_INFO        2
19
 
#define MBF_EXCL        4
 
13
#define MBF_OK    1
 
14
#define MBF_INFO  2
 
15
#define MBF_EXCL  4
20
16
 
21
17
#if defined __GNUC__ && (__GNUC__ >= 4)
22
18
        #define NO_RETURN __attribute__ ((noreturn))
36
32
 *                 - MB_EXCL : Warning
37
33
 *                 - MB_INFO : Info
38
34
 */
39
 
void ErrorMessageBox(const char* msg, const char* caption, unsigned int flags) NO_RETURN;
 
35
void ErrorMessageBox(const std::string& msg, const std::string& caption, unsigned int flags = MBF_OK) NO_RETURN;
40
36
 
41
 
/**
42
 
 * Will pop up an error message window and exit (C++ version).
43
 
 * @see ErrorMessageBox(const char* msg, const char* caption, unsigned int flags)
44
 
 */
45
 
inline void ErrorMessageBox(const std::string& msg, const std::string& caption, unsigned int flags = MBF_OK)
46
 
{
47
 
        ErrorMessageBox(msg.c_str(), caption.c_str(), flags);
48
 
};
49
37
 
50
38
#endif // ERRORHANDLER_H