Skip to content

MCError throwing TypeError on errors from 0x0051 to 0x0054 #5

Open
@ElectricMolasses

Description

@ElectricMolasses

When an error code between 0x0051 and 0x0054 inclusive is caught by MCError, the application throws two exceptions before crashing. The first is MCError: <exception str() failed>, and the second is the cause of the nested error, TypeError '>=' not supported between instances of 'str' and 'int'.

I have an incoming PR that I'll link to this issue that I believe fixes the bug, but I don't have a PLC to test against.

My solution handles both ints and strings, though I'm fairly certain only strings will be passed down, I just can't confirm that myself and there's an explicit str cast on errorcode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions