sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    No Syntax Errors on Loading?

    Scheduled Pinned Locked Moved Developers' Forum
    9 Posts 3 Posters 569 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      Jim
      last edited by Jim

      @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.

      Hi

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        SU8?

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          Yes, version 8 displays no errors, while version 7 shows an error dialog on the same file.

          Hi

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            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?

            Thomas Thomassen β€” SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              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.

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by

                @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.

                Hi

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  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'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Jim
                    last edited by

                    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.

                    Hi

                    1 Reply Last reply Reply Quote 0
                    • Dan RathbunD Offline
                      Dan Rathbun
                      last edited by

                      @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"
                          }
                      #
                      
                      

                      I'm not here much anymore.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Buy SketchPlus
                      Buy SUbD
                      Buy WrapR
                      Buy eBook
                      Buy Modelur
                      Buy Vertex Tools
                      Buy SketchCuisine
                      Buy FormFonts

                      Advertisement