No Syntax Errors on Loading?
-
@jim said:
I was feeling left out, so I added a loaderr.rb file to Plugins, and filled in with nonsense, but I didn't get a load error.
SketchUp 8 does not display the Load Error dialog for scripts that have syntax errors, as version 7 does.
-
SU8?
-
Yes, version 8 displays no errors, while version 7 shows an error dialog on the same file.
-
That's no good. Makes it very hard to debug startup errors.
Do you get output of you use the command argument to route it to file?
-
What kind of nonsense ??
Others are reporting the Load Error dialog for when files cannot be found by require and for method first argument syntax errors.
-
@thomthom said:
That's no good. Makes it very hard to debug startup errors.
Do you get output of you use the command argument to route it to file?
No output is generated at all using a command-line:
Sketchup.exe > log.txt 2>&1
. But I still think this is better than stopping SketchUp dead with a model Load Error dialog like in version 7.You can still see any errors by loading the file using the Ruby Console. But it might be nice to see the errors in the redirected log.txt file.
-
And what if the very first file to load !!!aaa.rb opens the Ruby Console and waits a half sec, before letting the load process continue ??
. -
I don't know, what happens? (because I'm not sure how to go about doing that.)
And let me thank Sketchup for fixing those "freeCommand" lines in the output.
-
@jim said:
I don't know, what happens? (because I'm not sure how to go about doing that.)
here is a simple file that should load before all others:
call it !!!aaa.rb# # file; !!!aaa.rb # # A snippet from my !loadpaths.rb - by Dan Rathbun # skp_info=true ruby_info=true load_paths=true global_vars=false # delay=0.5 # Sketchup.send_action("showRubyPanel;") UI.start_timer(delay,false) { puts "\n" puts '----------------------------------------------------'<<"\n" if skp_info # print Sketchup Info to console puts ' Sketchup has been Loaded...'<<"\n" puts ' Sketchup Version ; '<<"#{Sketchup.version}\n" puts '----------------------------------------------------'<<"\n" end if ruby_info # print Ruby Info to console puts ' RUBY has been Loaded...'<<"\n" puts ' RUBY_PLATFORM ; '<<"#{RUBY_PLATFORM}\n" puts ' RUBY_VERSION ; '<<"#{RUBY_VERSION}" puts ' RUBY_PATCHLEVEL ; '<<"#{RUBY_PATCHLEVEL}" puts ' RUBY_RELEASE_DATE ; '<<"#{RUBY_RELEASE_DATE}" puts ' RUBY_COPYRIGHT ; '<<"#{RUBY_COPYRIGHT}\n" puts '----------------------------------------------------'<<"\n" end # ruby_info if load_paths # print LOAD PATHS to console puts "\n LOAD PATHS ($LOAD_PATH | aka $;) array;\n" $LOAD_PATH.each {|x| puts " #{x}\n"} puts '----------------------------------------------------'<<"\n" end # load_paths if global_vars # print Global variables to console puts ' RUBY Global variables;'<<"\n" puts '----------------------------------------------------'<<"\n" global_variables.each {|x| puts " #{x} = "<<eval("#{x}.inspect"<<"\n")} end # global_vars puts '----------------------------------------------------'<<"\n\n" } #
Advertisement