From 2c7f9980a5c606da22c7187af9cae2a455567899 Mon Sep 17 00:00:00 2001 From: Pinghao Wu Date: Sat, 26 Oct 2024 19:18:46 +0800 Subject: [PATCH] CephFSExecutor: cursor extra: fallback to class name if msg empty --- src/main/java/org/safcephfs/CephFSExecutor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/safcephfs/CephFSExecutor.java b/src/main/java/org/safcephfs/CephFSExecutor.java index db22b30..9b55c41 100644 --- a/src/main/java/org/safcephfs/CephFSExecutor.java +++ b/src/main/java/org/safcephfs/CephFSExecutor.java @@ -173,7 +173,9 @@ public class CephFSExecutor { return execute(op); } catch (IOException e) { var extra = new Bundle(); - extra.putString(DocumentsContract.EXTRA_ERROR, e.getMessage()); + var msg = e.getMessage(); + extra.putString(DocumentsContract.EXTRA_ERROR, + (msg != null && msg.length() != 0) ? msg : e.getClass().getName()); c.setExtras(extra); return null; } -- 2.45.2