From 2694299fe15c0553101d2107f6689975d16525dc Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 20 Nov 2013 10:01:16 +0100 Subject: observer: improve wx version of crashdump_viewer * bugfixes * add first test * remove unused code --- lib/observer/src/cdv_dist_wx.erl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'lib/observer/src/cdv_dist_wx.erl') diff --git a/lib/observer/src/cdv_dist_wx.erl b/lib/observer/src/cdv_dist_wx.erl index 6e6284a6ba..3910f4fac5 100644 --- a/lib/observer/src/cdv_dist_wx.erl +++ b/lib/observer/src/cdv_dist_wx.erl @@ -58,10 +58,15 @@ get_detail_cols(_) -> %% Callbacks for cdv_detail_win get_details(Id) -> - {ok,Info,TW} = crashdump_viewer:node_info(Id), - Proplist = crashdump_viewer:to_proplist(record_info(fields,nod),Info), - Title = io_lib:format("~s (~s)",[Info#nod.name,Id]), - {ok,{Title,Proplist,TW}}. + case crashdump_viewer:node_info(Id) of + {ok,Info,TW} -> + Proplist = crashdump_viewer:to_proplist(record_info(fields,nod),Info), + Title = io_lib:format("~s (~s)",[Info#nod.name,Id]), + {ok,{Title,Proplist,TW}}; + {error,not_found} -> + Info = "The node you are searching for could not be found.", + {info,Info} + end. detail_pages() -> [{"General Information", fun init_gen_page/2}]. -- cgit v1.2.3