mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Schwartzmeyer (JIRA)" <>
Subject [jira] [Assigned] (MESOS-8861) Clean up error handling
Date Tue, 02 Oct 2018 21:43:00 GMT


Andrew Schwartzmeyer reassigned MESOS-8861:

    Assignee:     (was: Andrew Schwartzmeyer)

> Clean up error handling
> -----------------------
>                 Key: MESOS-8861
>                 URL:
>             Project: Mesos
>          Issue Type: Task
>            Reporter: Andrew Schwartzmeyer
>            Priority: Major
>              Labels: stout, windows
> First, {{os::strerror}} should be deleted (at least on Windows), and {{errno}} should
_almost never_ be used, instead preferring {{ErrnoError}}.
> Second, {{WindowsError}} and {{WSASocketError}} are redundant. They are distinguishable
only in that the former calls {{GetLastError}} and the latter calls {{WSAGetLastError}}, but
these functions are aliases of each other. This abstraction also introduced the redundant
{{SocketError}}, which is aliased to {{ErrnoError}} on Linux and {{WSASocketError}} on Windows.
With Windows no longer using the CRT, we could conceivably have a {{SystemError}} which is
correctly {{Errno}} or {{Windows}} depending on the platform.
> Third, but this is unlikely to happen, {{Try<T, Error>}} should start returning
the {{Error}} instead of the string, as we frequently need access to its {{code}}, but can't
get it because {{Try}} is unfortunately wired to instead return the error message string if
it's typed on {{Error}}. This is bizarre because it will return the {{Error}} class if it's
instead {{Try<T, ErrnoError>}} etc. If we could also get the {{Error}} back, we could
stop writing code that checks {{errno}} on POSIX and {{GetLastError()}} on Windows manually.

This message was sent by Atlassian JIRA

View raw message