Skip to content

Commit

Permalink
do not use default message if null passed for SystemException, Applic…
Browse files Browse the repository at this point in the history
…ationException, IOException
  • Loading branch information
OwnageIsMagic committed Dec 25, 2023
1 parent 63eadaf commit 70a07d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public ApplicationException()
// and its ExceptionInfo reference set to null.
//
public ApplicationException(string? message)
: base(message ?? SR.Arg_ApplicationException)
: base(message)
{
HResult = HResults.COR_E_APPLICATION;
}

public ApplicationException(string? message, Exception? innerException)
: base(message ?? SR.Arg_ApplicationException, innerException)
: base(message, innerException)
{
HResult = HResults.COR_E_APPLICATION;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ public IOException()
}

public IOException(string? message)
: base(message ?? SR.Arg_IOException)
: base(message)
{
HResult = HResults.COR_E_IO;
}

public IOException(string? message, int hresult)
: base(message ?? SR.Arg_IOException)
: base(message)
{
HResult = hresult;
}

public IOException(string? message, Exception? innerException)
: base(message ?? SR.Arg_IOException, innerException)
: base(message, innerException)
{
HResult = HResults.COR_E_IO;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ public SystemException()
}

public SystemException(string? message)
: base(message ?? SR.Arg_SystemException)
: base(message)
{
HResult = HResults.COR_E_SYSTEM;
}

public SystemException(string? message, Exception? innerException)
: base(message ?? SR.Arg_SystemException, innerException)
: base(message, innerException)
{
HResult = HResults.COR_E_SYSTEM;
}
Expand Down

0 comments on commit 70a07d4

Please sign in to comment.