Skip to content

ResetLastError methods does not work #359

@1-Accelerator-1

Description

@1-Accelerator-1

public override void ResetLastError()
{
base.LastError.Remove(0, LastError.Length);
LastException = null;
}

public override void ResetLastError()
{
LastError.Remove(0, LastError.Length);
LastException = null;
}

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions