mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-23 12:27:56 +08:00
refactor crash message + fix wording
This commit is contained in:
@@ -286,5 +286,16 @@ module Motion; module Project
|
||||
def datadir(target=deployment_target)
|
||||
File.join(motiondir, 'data', template.to_s, target)
|
||||
end
|
||||
|
||||
def print_crash_message
|
||||
$stderr.puts ''
|
||||
$stderr.puts '=' * 80
|
||||
$stderr.puts <<EOS
|
||||
The application terminated. A crash report file may have been generated by the
|
||||
system, use `rake crashlog' to open it. Use `rake debug=1' to restart the app
|
||||
in the debugger.
|
||||
EOS
|
||||
$stderr.puts '=' * 80
|
||||
end
|
||||
end
|
||||
end; end
|
||||
|
||||
@@ -111,15 +111,7 @@ END
|
||||
at_exit { system("stty echo") } if $stdout.tty? # Just in case the simulator launcher crashes and leaves the terminal without echo.
|
||||
Signal.trap(:INT) { } if ENV['debug']
|
||||
system "#{env} #{sim} #{debug} #{family_int} #{target} \"#{xcode}\" \"#{app}\" #{app_args}"
|
||||
if $?.exitstatus != 0
|
||||
$stderr.puts '=' * 80
|
||||
$stderr.puts <<EOS
|
||||
The application crashed. A crash report file may have been generated by the
|
||||
system, use `rake crashlog' to open it. Use `rake debug=1' to restart the app
|
||||
in the debugger.
|
||||
EOS
|
||||
$stderr.puts '=' * 80
|
||||
end
|
||||
App.config.print_crash_message if $?.exitstatus != 0
|
||||
end
|
||||
|
||||
desc "Create an .ipa archive"
|
||||
|
||||
@@ -65,9 +65,7 @@ task :run do
|
||||
at_exit { system("stty echo") } if $stdout.tty? # Just in case the process crashes and leaves the terminal without echo.
|
||||
Signal.trap(:INT) { } if ENV['debug']
|
||||
system "#{env} #{sim} #{debug} #{target} \"#{exec}\" #{app_args}"
|
||||
if $?.exitstatus != 0
|
||||
$stderr.puts "\nThe application crashed. A crash report file may have been generated by the system, use `rake crashlog' to open it. Use `rake debug=1' to restart the app in the debugger."
|
||||
end
|
||||
App.config.print_crash_message if $?.exitstatus != 0
|
||||
end
|
||||
|
||||
desc "Run the test/spec suite"
|
||||
|
||||
Reference in New Issue
Block a user