Permalink
Browse files

Suppress wx error messages when wx fails to start

  • Loading branch information...
1 parent 53ba69b commit 36aa24d7ce181b94e67ef6b3709e7c19c28528dc @hawk committed Jun 13, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 bin/lux
View
@@ -186,15 +186,14 @@ info_doc() ->
io:format("\nRead the full documentation in the browser:\n\n\t~s\n", [Url]).
help(Specs) ->
- _AppDir = ensure_app_dir(true),
- AppDir = code:lib_dir(?APPLICATION),
+ AppDir = ensure_app_dir(true),
require_app(?APPLICATION, "--help"),
Url = doc_url(AppDir),
io:format("\nTrying to automatically launch the"
" default browser with file...\n\n\t~s\n",
[Url]),
try
- wx:new(),
+ wx:new([{silent_start, true}]),
true = wx_misc:launchDefaultBrowser(Url),
timer:sleep(1000),
wx:destroy()

0 comments on commit 36aa24d

Please sign in to comment.