Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Some Error Codes Collide #277

Closed
Mythra opened this issue Dec 6, 2020 · 1 comment
Closed

Some Error Codes Collide #277

Mythra opened this issue Dec 6, 2020 · 1 comment

Comments

@Mythra
Copy link
Contributor

Mythra commented Dec 6, 2020

While looking into parsing errors inside of my crate to show slightly nicer error messages for my application specifically I've noticed that there seem to be several error codes that collide. Specifically the module error codes export CE02, and CE03 for the cause: CANNOT_IMPORT_ERROR_CODE, and BORROW_ERROR_CODE:

const CANNOT_IMPORT_ERROR_CODE: &str = "CE02";
const BORROW_ERROR_CODE: &str = "CE03";

However, these are also exported by the common evaluation error codes:

pub const RETURN_ERROR_CODE: &str = "CE02";
#[doc(hidden)]
pub const INCORRECT_LEFT_VALUE_ERROR_CODE: &str = "CE03";

These error codes don't seem to line up either RETURN_ERROR_CODE != CANNOT_IMPORT_ERROR_CODE in my mind. Are these simple typo's or do they represent the exact same error case?

@damienmg
Copy link
Member

damienmg commented Feb 1, 2021

Those are definitely error code clashes, that's why there is a TODO somewhere to have all error code in one place :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants