This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make a few changes requested by SDK team
1) Throw different exceptions for each error (instead of passing the message) 2) Add the GetGUIBit method.
- Loading branch information
1 parent
1b7756a
commit 57d5072
Showing
8 changed files
with
197 additions
and
76 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/managed/Microsoft.NET.HostModel/AppHost/AppHostCustomizationUnsupportedOSException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
namespace Microsoft.NET.HostModel.AppHost | ||
{ | ||
/// <summary> | ||
/// The application host executable cannot be customized because adding resources requires | ||
/// that the build be performed on Windows (excluding Nano Server). | ||
/// </summary> | ||
public class AppHostCustomizationUnsupportedOSException : AppHostUpdateException | ||
{ | ||
} | ||
} | ||
|
17 changes: 17 additions & 0 deletions
17
src/managed/Microsoft.NET.HostModel/AppHost/AppHostNotCUIException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
namespace Microsoft.NET.HostModel.AppHost | ||
{ | ||
/// <summary> | ||
/// Unable to use the input file as application host executable because it's not a | ||
/// Windows executable for the CUI (Console) subsystem. | ||
/// </summary> | ||
public class AppHostNotCUIException : AppHostUpdateException | ||
{ | ||
} | ||
} | ||
|
17 changes: 17 additions & 0 deletions
17
src/managed/Microsoft.NET.HostModel/AppHost/AppHostNotPEFileException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
namespace Microsoft.NET.HostModel.AppHost | ||
{ | ||
/// <summary> | ||
/// Unable to use the input file as an application host executable | ||
/// because it's not a Windows PE file | ||
/// </summary> | ||
public class AppHostNotPEFileException : AppHostUpdateException | ||
{ | ||
} | ||
} | ||
|
17 changes: 17 additions & 0 deletions
17
src/managed/Microsoft.NET.HostModel/AppHost/AppHostUpdateException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
namespace Microsoft.NET.HostModel.AppHost | ||
{ | ||
/// <summary> | ||
/// An instance of this exception is thrown when an AppHost binary update | ||
/// fails due to known user errors. | ||
/// </summary> | ||
public class AppHostUpdateException : Exception | ||
{ | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/managed/Microsoft.NET.HostModel/AppHost/AppUpdatePlaceHolderNotFoundException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
namespace Microsoft.NET.HostModel.AppHost | ||
{ | ||
/// <summary> | ||
/// Unable to use input file as a valid application host executable, as it does not contain | ||
/// the expected placeholder byte sequence. | ||
/// </summary> | ||
public class AppUpdatePlaceHolderNotFoundException : AppHostUpdateException | ||
{ | ||
public byte[] MissingPattern; | ||
|
||
public AppUpdatePlaceHolderNotFoundException(byte[] pattern) | ||
{ | ||
MissingPattern = pattern; | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.