Changeset 757

Show
Ignore:
Timestamp:
10/27/07 18:50:56 (6 years ago)
Author:
cho45
Message:

lang/ruby/Amalgam/AppController.rb,
lang/ruby/Amalgam/rb_main.rb:

例外発生時にメッセージだしてから終了するように

Location:
lang/ruby/Amalgam
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/Amalgam/AppController.rb

    r754 r757  
    378378                ret 
    379379        end 
    380 end 
    381  
    382  
     380 
     381end 
     382 
     383 
  • lang/ruby/Amalgam/rb_main.rb

    r734 r757  
    1717end 
    1818 
     19def alert(title, msg) 
     20        OSX.NSRunAlertPanel(title, msg, "OK", "", nil) 
     21end 
     22 
    1923def rb_main_init 
    2024        path = OSX::NSBundle.mainBundle.resourcePath.fileSystemRepresentation 
     
    2933        rb_main_init 
    3034        OSX::NSApplicationWithHotKey.sharedApplication 
    31         OSX.NSApplicationMain(0, nil) 
     35        begin 
     36                OSX.NSApplicationMain(0, nil) 
     37        rescue Exception => e 
     38                $stderr.puts e 
     39                $stderr.puts e.backtrace 
     40                alert("Exception!", "#{e.inspect}\nAbort. See console.log to get more information.") 
     41        end 
    3242end