diff options
author | Siri Hansen <[email protected]> | 2013-11-20 10:01:16 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-01-27 16:13:57 +0100 |
commit | 2694299fe15c0553101d2107f6689975d16525dc (patch) | |
tree | 8e48fab25f8c07973dd144f4430f81f3667fcc5a /lib/observer/src/cdv_dist_wx.erl | |
parent | 5a30dd40a691d610def7b1f00cf39ed0d78eb900 (diff) | |
download | otp-2694299fe15c0553101d2107f6689975d16525dc.tar.gz otp-2694299fe15c0553101d2107f6689975d16525dc.tar.bz2 otp-2694299fe15c0553101d2107f6689975d16525dc.zip |
observer: improve wx version of crashdump_viewer
* bugfixes
* add first test
* remove unused code
Diffstat (limited to 'lib/observer/src/cdv_dist_wx.erl')
-rw-r--r-- | lib/observer/src/cdv_dist_wx.erl | 13 |
1 files changed, 9 insertions, 4 deletions
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}]. |