mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-04-28 12:48:21 +00:00
pdp10_stdio:fopen/2: silence unwanted crash report on failure; scan_state:fopen/1: likewise
This commit is contained in:
@@ -110,6 +110,7 @@ fopen(Path, Modes) ->
|
||||
do_open(What) ->
|
||||
case gen_server:start(?MODULE, What, []) of
|
||||
{ok, Pid} -> {ok, #file{pid = Pid}};
|
||||
{error, {shutdown, Reason}} -> {error, Reason};
|
||||
{error, _Reason} = Error -> Error
|
||||
end.
|
||||
|
||||
@@ -190,8 +191,8 @@ do_init({ok, {IoDev, Read, Write}}) ->
|
||||
, iodir = seek
|
||||
}};
|
||||
do_init({error, Reason}) ->
|
||||
%% FIXME: this still seems to generate crash reports
|
||||
{stop, Reason}.
|
||||
%% The {shutdown, ...} wrapper prevents an unwanted crash report.
|
||||
{stop, {shutdown, Reason}}.
|
||||
|
||||
handle_call(Req, _From, State) ->
|
||||
case Req of
|
||||
|
||||
Reference in New Issue
Block a user