Skip to content

ResetLastError method does not work #229

Closed

Description

public override void ResetLastError()
{
if (base.LastError.Length > 0)
base.LastError.Remove(0, LastError.Length - 1);
LastException = null;
_ActiveExceptionsList.Clear();
}

String is immutable. When you delete the LastError field, it is not deleted, but a new line is created in which there are no characters, that is, an empty string. To fix this, you must return the result of the Remove method in the LastError field.

base.LastError = base.LastError.Remove(0, LastError.Length - 1);

Activity

  1. added
    Investigating
    on Jan 27, 2022
  2. added
    bug
    and removed
    Investigating
    on Feb 15, 2022
  3. MattB-msft commented on Feb 15, 2022

    @MattB-msft
    Member

    This has been fixed by the team and will be in the next drop/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions