-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[API Proposal]: public ctor for CookieException with string parameter #95965
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsBackground and motivationCDD - Cookie Driven Development API Proposalnamespace System.Net
{
[Serializable]
[...]
public class CookieException : FormatException, ISerializable
{
public CookieException() : base()
{
}
// Please make this public
public CookieException(string? message) : base(message)
{
} Please change access modifier for ctor with string? to public. API Usagethrow new CookieException("🥮");
throw new CookieException("🍥");
throw new CookieException("🍪");
throw new CookieException("🍩");
throw new CookieException("🍰"); Alternative DesignsAlternatively make it protected, so I still can initialize CookieException with particular cookie. RisksInstance of CookieMonster may appear unexpectedly.
|
Personally I would be fine with this, and it looks like a trivial addition. Most BCL exception constructors allow passing a message string, it's @dotnet/ncl any objections against marking this ready for review? |
Triage: assigned to Future given it's not critical. Once the API is approved, we can mark it |
namespace System.Net;
public partial class CookieException
{
// Existing ctors:
// public CookieException();
// public CookieException(SerializationInfo, StreamingContext);
public CookieException(string? message);
public CookieException(string? message, Exception? innerException);
} |
@terrajobst Incredible! Attached video - transparency level 1000. |
@terrajobst @vcsjones Can I implement the feature? Happy to assign me. |
Background and motivation
CDD - Cookie Driven Development
API Proposal
Please change access modifier for ctor with string? to public.
API Usage
Alternative Designs
Alternatively make it protected, so I still can initialize CookieException with particular cookie.
Risks
Instance of CookieMonster may appear unexpectedly.
The text was updated successfully, but these errors were encountered: