Skip to content

Does this package need panic when error is return or just return the error? #74

@bronze1man

Description

@bronze1man

GetClientRect panic when error is return.
ReleaseDC return false when error is return.
CreateWindowEx return null and ignore the real error message. (I have verified the GetLastError api will not return error when this api fail.)

Here is my suggest:

  • Use MustGetClientRect to show the this function will panic when error is return.(so the caller can not simple ignore the error, it will stop the program when the error occured. the caller can ignore it will recover )
  • Use GetClientRect return a error type to show if there is an error. (so the caller can ignore it easier)

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