Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
43 lines (40 sloc) 1.22 KB
#==============================================================================
# ** Main
#------------------------------------------------------------------------------
# This processing is executed after module and class definition is finished.
#==============================================================================
begin
rgss_main do
begin
SceneManager.run
rescue RGSSReset
Graphics.transition(10)
retry
end
end
rescue SystemExit
exit
rescue Exception => error
scripts_name = load_data('Data/Scripts.rvdata2')
scripts_name.collect! {|script| script[1] }
backtrace = []
error.backtrace.each_with_index {|line,i|
if line =~ /{(.*)}(.*)/
backtrace << (scripts_name[$1.to_i] + $2)
elsif line.start_with?(':1:')
break
else
backtrace << line
end
}
error_line = backtrace.first
error_msg = "%s: %s, %s" %[error_line, error.message, error.class]
backtrace[0] = ''
File.open("error_log.txt", "w") do |f|
f.write(error_msg)
f.write(backtrace.join("\n\tfrom "))
end
print error_msg, backtrace.join("\n\tfrom "), "\n"
raise error.class, "Error ocurred, check the debug console for more information.", [error.backtrace.first]
end
exit
You can’t perform that action at this time.