Skip to content

Improvement potential for Parse(...) #4

@maettu-this

Description

@maettu-this
  • The method's description states InvalidOperationException as possible exception. However, Process() > OnProcess() may throw an UnhandledCharacterCodeException which is not documented, i.e. may get forgotten to be catched.
  • The void/Exception semantic of the method makes usage potentially inefficient, as exceptions are involved on all mismatching chars. Consider int int.Parse(string s) vs. bool int.TryParse(string s, out int result). The latter indicates failure by the return value, but doesn't throw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions