aboutsummaryrefslogtreecommitdiffstats
path: root/src/errors.rs
diff options
context:
space:
mode:
authorDenis Maximov <denismaximov98@gmail.com>2020-12-04 10:59:06 +0200
committerGitHub <noreply@github.com>2020-12-04 09:59:06 +0100
commitb7b3ff74cfa09fce1442bda42332939de4903a7d (patch)
treee84876d04679ebbc913e9d65f6c2a45f0642fdcc /src/errors.rs
parentfix(compatibility): keypad arrow fixes (#80) (diff)
downloadsl0ppij-b7b3ff74cfa09fce1442bda42332939de4903a7d.tar.gz
sl0ppij-b7b3ff74cfa09fce1442bda42332939de4903a7d.tar.xz
sl0ppij-b7b3ff74cfa09fce1442bda42332939de4903a7d.zip
feat(rect): directional move focus #55 (#78)
* feat: directional move focus #55 * wip: refactored match into if let * wip: basic tests * feat: move to most overlapping pane tests * fix: formatting * wip: Moved the definitions to the Rect trait * formatting
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs48
1 files changed, 20 insertions, 28 deletions
diff --git a/src/errors.rs b/src/errors.rs
index 26e0010d..437db0dd 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -15,34 +15,26 @@ pub fn handle_panic(info: &PanicInfo<'_>, send_app_instructions: &SyncSender<App
};
let backtrace = match (info.location(), msg) {
- (Some(location), Some(msg)) => {
- format!(
- "\nthread '{}' panicked at '{}': {}:{}\n{:?}",
- thread,
- msg,
- location.file(),
- location.line(),
- backtrace
- )
- }
- (Some(location), None) => {
- format!(
- "\nthread '{}' panicked: {}:{}\n{:?}",
- thread,
- location.file(),
- location.line(),
- backtrace
- )
- }
- (None, Some(msg)) => {
- format!(
- "\nthread '{}' panicked at '{}'\n{:?}",
- thread, msg, backtrace
- )
- }
- (None, None) => {
- format!("\nthread '{}' panicked\n{:?}", thread, backtrace)
- }
+ (Some(location), Some(msg)) => format!(
+ "\nthread '{}' panicked at '{}': {}:{}\n{:?}",
+ thread,
+ msg,
+ location.file(),
+ location.line(),
+ backtrace
+ ),
+ (Some(location), None) => format!(
+ "\nthread '{}' panicked: {}:{}\n{:?}",
+ thread,
+ location.file(),
+ location.line(),
+ backtrace
+ ),
+ (None, Some(msg)) => format!(
+ "\nthread '{}' panicked at '{}'\n{:?}",
+ thread, msg, backtrace
+ ),
+ (None, None) => format!("\nthread '{}' panicked\n{:?}", thread, backtrace),
};
if thread == "main" {