Skip to content

Add additional cause information to error messages #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ impl std::fmt::Display for Error {
DlSymUnknown => write!(f, "dlsym failed, but system did not report the error"),
DlClose { ref desc } => write!(f, "{}", desc.0.to_string_lossy()),
DlCloseUnknown => write!(f, "dlclose failed, but system did not report the error"),
LoadLibraryExW { .. } => write!(f, "LoadLibraryExW failed"),
LoadLibraryExW { ref source } => write!(f, "LoadLibraryExW failed: {}", source.0),
LoadLibraryExWUnknown =>
write!(f, "LoadLibraryExW failed, but system did not report the error"),
GetModuleHandleExW { .. } => write!(f, "GetModuleHandleExW failed"),
GetModuleHandleExW { ref source } => write!(f, "GetModuleHandleExW failed: {}", source.0),
GetModuleHandleExWUnknown =>
write!(f, "GetModuleHandleExWUnknown failed, but system did not report the error"),
GetProcAddress { .. } => write!(f, "GetProcAddress failed"),
GetProcAddress { ref source } => write!(f, "GetProcAddress failed: {}", source.0),
GetProcAddressUnknown =>
write!(f, "GetProcAddress failed, but system did not report the error"),
FreeLibrary { .. } => write!(f, "FreeLibrary failed"),
FreeLibrary { ref source } => write!(f, "FreeLibrary failed: {}", source.0),
FreeLibraryUnknown =>
write!(f, "FreeLibrary failed, but system did not report the error"),
CreateCString { .. } => write!(f, "could not create a C string from bytes"),
Expand Down