1 /*******************************************************************************
2 
3     Exception to raise to safely exit the program.
4 
5     Copyright:
6         Copyright (c) 2009-2016 dunnhumby Germany GmbH.
7         All rights reserved.
8 
9     License:
10         Boost Software License Version 1.0. See LICENSE_BOOST.txt for details.
11         Alternatively, this file may be distributed under the terms of the Tango
12         3-Clause BSD License (see LICENSE_BSD.txt for details).
13 
14 *******************************************************************************/
15 
16 module ocean.util.app.ExitException;
17 
18 
19 
20 import ocean.meta.types.Qualifiers;
21 
22 
23 /*******************************************************************************
24 
25     Exception to raise to safely exit the program.
26 
27     Should usually be used via Application.exit().
28 
29 *******************************************************************************/
30 
31 public class ExitException : Exception
32 {
33 
34     /***************************************************************************
35 
36         Exit status to return to the OS at exit.
37 
38     ***************************************************************************/
39 
40     int status;
41 
42 
43     /***************************************************************************
44 
45         Exit exception constructor.
46 
47         Params:
48             status = exit status to return to the OS at exit
49             msg = optional message to show just before exiting
50 
51     ***************************************************************************/
52 
53     this ( int status, istring msg = null )
54     {
55         super(msg);
56         this.status = status;
57     }
58 
59 }