Nonsequential Ruby Error Output in Netbeans Console -
Nonsequential Ruby Error Output in Netbeans Console -
i'm trying started using netbeans 7.0 rails development, , using latest ruby plugin. record switched default 1.8.7 interpreter point local 1.9.2 ruby installation, issue seems happen both interpreters.
when ruby encounters error in code, error output shown @ random points in console output. have expected print error encountered, looks error stream , normal output stream beingness updated on different threads. give example...with code:
(0..10).each { |o| puts "normal output" } invalidsytax!
i triggering syntax error on sec line, error output can vary. example:
normal output normal output normal output ~/learnruby/lib/ch1_ex2.rb:41:in `<main>': undefined method `invalidsytax!' main:object (nomethoderror) normal output normal output normal output normal output normal output normal output normal output normal output
and...
~/learnruby/lib/ch1_ex2.rb:41:in `<main>': undefined method `invalidsytax!' main:object (nomethoderror) normal output normal output normal output normal output normal output normal output normal output normal output normal output normal output normal output
any thought causing this? see beingness big problem in bigger project, when might think code has no issues there's error message beingness outputted @ origin of console stream.
that's because of netbeans' internal handling of stdout , stderr, output not deterministic, suppose they're both handled in 2 separate threads suspected. witness of race status here.
but happens independently of using ruby or not - e.g. when run junit tests java projects, same happens, stderr , stdout output gets mixed indeterministically.
why consider problem? long output not mixed gibberish (this happen if both threads seek write netbeans' console @ same time , no proper locking mechanism in place) don't see why matter.
the same principle can observed log files of web applications. if lot of client connections seek log info file @ same time, not able predict order in messages appear - in sentiment behaviour inherent multi-threaded applications.
ruby netbeans netbeans-plugins
Comments
Post a Comment