5 // Martin Adoue (martin@cwanet.com)
6 // Chris J Breisch (cjbreisch@altavista.net)
7 // Francesco Delfino (pluto@tipic.com)
9 // (C) 2002 Ximian Inc.
10 // 2002 Tipic, Inc. (http://www.tipic.com)
14 // Copyright (c) 2002-2003 Mainsoft Corporation.
15 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
17 // Permission is hereby granted, free of charge, to any person obtaining
18 // a copy of this software and associated documentation files (the
19 // "Software"), to deal in the Software without restriction, including
20 // without limitation the rights to use, copy, modify, merge, publish,
21 // distribute, sublicense, and/or sell copies of the Software, and to
22 // permit persons to whom the Software is furnished to do so, subject to
23 // the following conditions:
25 // The above copyright notice and this permission notice shall be
26 // included in all copies or substantial portions of the Software.
28 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 using System.ComponentModel;
39 using System.Runtime.InteropServices;
41 namespace Microsoft.VisualBasic.CompilerServices
45 [EditorBrowsable(EditorBrowsableState.Never)]
46 [StructLayout(LayoutKind.Auto)]
47 public sealed class ProjectData {
49 private ProjectData () {}
51 internal static int erl;
52 internal static Microsoft.VisualBasic.ErrObject pErr = new ErrObject();
54 internal static System.Exception projectError;
57 public static void ClearProjectError ()
62 internal static Microsoft.VisualBasic.ErrObject Err
69 public static Exception CreateProjectError(int hr)
72 return pErr.CreateException(hr, VBUtils.GetResourceString(pErr.MapErrorNumber(hr)));
75 public static void SetProjectError(Exception ex)
77 pErr.CaptureException(ex);
80 public static void SetProjectError(Exception ex, int lErl)
82 pErr.CaptureException(ex, lErl);
85 public static void EndApp()
87 //FileSystem.CloseAllFiles(Assembly.GetCallingAssembly());