-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Created exception for unsupported AOA asset conversion filetypes #21822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
cc1922b
7395ab6
a137269
b6fac98
be31b54
4d262ec
eaa2686
f312f1f
a5ffc33
92f6a22
e60771c
af314dd
5ccb7b1
3944a46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System; | ||
| using Azure.MixedReality.ObjectAnchors.Conversion.Models; | ||
|
|
||
| namespace Azure.MixedReality.ObjectAnchors.Conversion | ||
| { | ||
| /// <summary> Model factory for read-only models. </summary> | ||
| internal static partial class AOAFrontEndAPIsModelFactory | ||
| { | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using Azure.Core; | ||
|
|
||
| namespace Azure.MixedReality.ObjectAnchors.Conversion | ||
| { | ||
| /// <summary> The ConversionErrorCode. </summary> | ||
| [CodeGenModel("ConversionErrorCode")] | ||
| public readonly partial struct ConversionErrorCode | ||
| { | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Runtime.Serialization; | ||
|
|
||
| namespace Azure.MixedReality.ObjectAnchors.Conversion | ||
| { | ||
| /// <summary> | ||
| /// An Exception thrown during an attempt to provide an unsupported asset file type in an asset conversion operation | ||
| /// </summary> | ||
| public class NotSupportedAssetFileTypeException : Exception, ISerializable | ||
|
JoshLove-msft marked this conversation as resolved.
Outdated
JoshLove-msft marked this conversation as resolved.
Outdated
|
||
| { | ||
| /// <summary> | ||
| /// Creates an instance of the UnsupportedAssetFileTypeException | ||
| /// </summary> | ||
| public NotSupportedAssetFileTypeException() | ||
| : base($"The provided asset file type is unsupported by Azure Object Anchors for conversion.") | ||
| { | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Creates an instance of the UnsupportedAssetFileTypeException | ||
| /// </summary> | ||
| /// <param name="message">The message corresponding to the exception</param> | ||
| public NotSupportedAssetFileTypeException(string message) | ||
| : base(message) | ||
| { | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// An Exception thrown during an attempt to provide an unsupported asset file type in an asset conversion operation | ||
| /// </summary> | ||
| /// <param name="message">The message corresponding to the exception</param> | ||
| /// <param name="inner">The inner exception</param> | ||
| public NotSupportedAssetFileTypeException(string message, Exception inner) | ||
|
JoshLove-msft marked this conversation as resolved.
Outdated
|
||
| : base(message, inner) | ||
| { | ||
| } | ||
|
|
||
| internal NotSupportedAssetFileTypeException(AssetFileType assetFileType, IEnumerable<AssetFileType> supportedAssetFileTypes) | ||
| : base($"The provided asset file type of \"{assetFileType}\" is unsupported by Azure Object Anchors for conversion. Supported file types: {string.Join(", ", supportedAssetFileTypes)}") | ||
| { | ||
| AttemptedFileType = assetFileType; | ||
| SupportedAssetFileTypes = supportedAssetFileTypes; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// An Exception thrown during an attempt to provide an unsupported asset file type in an asset conversion operation | ||
| /// </summary> | ||
| /// <param name="info">The SerializationInfo</param> | ||
| /// <param name="context">The StreamingContext</param> | ||
| protected NotSupportedAssetFileTypeException(SerializationInfo info, StreamingContext context) | ||
|
jastenze marked this conversation as resolved.
Outdated
|
||
| : base(info, context) | ||
| { | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// The unsupported filetype provided for asset conversion | ||
| /// </summary> | ||
| public AssetFileType AttemptedFileType { get; } | ||
|
|
||
| /// <summary> | ||
| /// The list of file types supported by Azure Object Anchors Conversion | ||
| /// </summary> | ||
| public IReadOnlyList<AssetFileType> SupportedAssetFileTypes { get; } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.