Skip to content
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

Introduce RequestNotSupportedException #2704

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#nullable enable
Microsoft.Testing.Platform.Requests.RequestNotSupportedException
Microsoft.Testing.Platform.Requests.RequestNotSupportedException.RequestNotSupportedException(Microsoft.Testing.Platform.Requests.IRequest! request) -> void
Microsoft.Testing.Platform.Requests.RequestNotSupportedException.Request.get -> Microsoft.Testing.Platform.Requests.IRequest!
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#nullable enable
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.Testing.Platform.Requests;

[Serializable]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should avoid this one based on docs updates: dotnet/docs#34893

public class RequestNotSupportedException : Exception
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we have the usual ctors? Message and inner exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if make sense...the platform doesn't needs any message, I think we will take the exception and we will do something like

  • print in console
  • crash
  • move on if we're good with it...

So I wonder what the test framework author could put in that message.

But I won't oppose if you want it to "standardize" or have some inheritance in future, it's not sealed atm.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No you are right, we won't do anything about it.

{
public RequestNotSupportedException(IRequest request)
{
Request = request;
}

public IRequest Request { get; }
}