[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b8cfe8fa75: Improve error checking in `haiku-roster-launch'
From: |
Po Lu |
Subject: |
master b8cfe8fa75: Improve error checking in `haiku-roster-launch' |
Date: |
Mon, 16 May 2022 03:17:34 -0400 (EDT) |
branch: master
commit b8cfe8fa754e3a3d197b785a179e0915ba4f53bf
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Improve error checking in `haiku-roster-launch'
* src/haikuselect.c (Fhaiku_roster_launch): Signal error if
FILE-OR-TYPE doesn't exist or ARGS does not apply.
---
src/haikuselect.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/haikuselect.c b/src/haikuselect.c
index f7618aa4db..313b26f6ba 100644
--- a/src/haikuselect.c
+++ b/src/haikuselect.c
@@ -780,7 +780,11 @@ DEFUN ("haiku-roster-launch", Fhaiku_roster_launch,
Shaiku_roster_launch,
doc: /* Launch an application associated with FILE-OR-TYPE.
Return the process ID of any process created, the symbol
`already-running' if ARGS was sent to a program that's already
-running, or nil if launching the application failed.
+running, or nil if launching the application failed because no
+application was found for FILE-OR-TYPE.
+
+Signal an error if FILE-OR-TYPE is invalid, or if ARGS is a message
+but the application doesn't accept messages.
FILE-OR-TYPE can either be a string denoting a MIME type, or a list
with one argument FILE, denoting a file whose associated application
@@ -861,6 +865,9 @@ after it starts. */)
make_uint (team_id));
else if (rc == B_ALREADY_RUNNING)
return Qalready_running;
+ else if (rc == B_BAD_VALUE)
+ signal_error ("Invalid type or bad arguments",
+ list2 (file_or_type, args));
return SAFE_FREE_UNBIND_TO (depth, Qnil);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b8cfe8fa75: Improve error checking in `haiku-roster-launch',
Po Lu <=