[PR #11] [MERGED] Error handling improvements #1388

Closed
opened 2026-05-23 02:58:13 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/mpd-discord-rpc/pull/11
Author: @MonterraByte
Created: 10/18/2020
Status: Merged
Merged: 10/18/2020
Merged by: @JakeStanger

Base: masterHead: master


📝 Commits (3)

  • b981f2b Write errors to stderr
  • 108a469 Print errors that occur when connecting to the MPD server
  • e5ad8b6 Remove unnecessary unwrap

📊 Changes

2 files changed (+11 additions, -8 deletions)

View changed files

📝 src/main.rs (+4 -4)
📝 src/mpd_conn.rs (+7 -4)

📄 Description

This changes try_get_mpd_conn to print connection errors instead of ignoring them. I also removed an unnecessary unwrap in the idle function and made all error messages be printed to stderr.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/mpd-discord-rpc/pull/11 **Author:** [@MonterraByte](https://github.com/MonterraByte) **Created:** 10/18/2020 **Status:** ✅ Merged **Merged:** 10/18/2020 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`b981f2b`](https://github.com/JakeStanger/mpd-discord-rpc/commit/b981f2b41c5df9e79c1697e36143b7a82ccc370f) Write errors to stderr - [`108a469`](https://github.com/JakeStanger/mpd-discord-rpc/commit/108a469893337ff141701f781d22aa76962e97b3) Print errors that occur when connecting to the MPD server - [`e5ad8b6`](https://github.com/JakeStanger/mpd-discord-rpc/commit/e5ad8b663469e05c2e6a7f2bafea9f6dba93776e) Remove unnecessary unwrap ### 📊 Changes **2 files changed** (+11 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/main.rs` (+4 -4) 📝 `src/mpd_conn.rs` (+7 -4) </details> ### 📄 Description This changes `try_get_mpd_conn` to print connection errors instead of ignoring them. I also removed an unnecessary unwrap in the `idle` function and made all error messages be printed to stderr. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-23 02:58:13 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/mpd-discord-rpc#1388
No description provided.