<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,7 @@
+Version 0.4.2.3, 31.01.2009
+- introduced Workling.raises_exceptions. by default, this is true in test and development to help with bug tracking. 
+- added :threaded as the default spawn runner for test and development. helps problem tracing. 
+
 Version 0.4.2.2, 29.11.08
 - turned Workling.load_path into an Array.
 </diff>
      <filename>CHANGES.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ module Workling
   
   mattr_accessor :load_path
   @@load_path = [ File.expand_path(File.join(File.dirname(__FILE__), '../../../../app/workers')) ]
-  VERSION = &quot;0.4.2.2&quot;
+  VERSION = &quot;0.4.2.3&quot;
   
   #
   # determine the runner to use if nothing is specifically set. workling will try to detect
@@ -132,6 +132,17 @@ module Workling
     end
   end
   
+  #
+  #  Raises exceptions thrown inside of the worker. normally, these are logged to 
+  #  logger.error. it's easy to miss these log calls while developing, though. 
+  #
+  mattr_accessor :raise_exceptions
+  @@raise_exceptions = (RAILS_ENV = &quot;test&quot; || RAILS_ENV = &quot;development&quot;)
+  
+  def self.raise_exceptions?
+    @@raise_exceptions
+  end
+  
   private
     def self.raise_not_found(clazz, method)
       raise Workling::WorklingNotFoundError.new(&quot;could not find #{ clazz }:#{ method } workling. &quot;) </diff>
      <filename>lib/workling.rb</filename>
    </modified>
    <modified>
      <diff>@@ -39,7 +39,7 @@ module Workling
       begin
         self.send(method, options)
       rescue Exception =&gt; e
-        raise e if e.kind_of? Workling::WorklingError
+        raise e if e.kind_of?(Workling::WorklingError) || Workling.raise_exceptions?
         logger.error &quot;WORKLING ERROR: runner could not invoke #{ self.class }:#{ method } with #{ options.inspect }. error was: #{ e.inspect }\n #{ e.backtrace.join(&quot;\n&quot;) }&quot;
       end
     end    </diff>
      <filename>lib/workling/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,9 @@ module Workling
     module Runners
       class SpawnRunner &lt; Workling::Remote::Runners::Base
         cattr_accessor :options
-        @@options = { :method =&gt; :fork }
+        
+        # use thread for development and test modes. easier to hunt down exceptions that way. 
+        @@options = { :method =&gt; (RAILS_ENV == &quot;test&quot; || RAILS_ENV == &quot;development&quot; ? :thread :fork) }
         include Spawn if Workling.spawn_installed?
         
         # dispatches to Spawn, using the :fork option. </diff>
      <filename>lib/workling/remote/runners/spawn_runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -42,4 +42,7 @@ require &quot;runners/thread_runner&quot;
 # worklings are in here.
 Workling.load_path = [&quot;#{ plugin_root }/test/workers&quot;]
 Workling::Return::Store.instance = Workling::Return::Store::MemoryReturnStore.new
-Workling::Discovery.discover!
\ No newline at end of file
+Workling::Discovery.discover!
+
+# make this behave like production code
+Workling.raise_exceptions = false
\ No newline at end of file</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cfb7055f11e8bbbf97615a868b7885a966989184</id>
    </parent>
  </parents>
  <author>
    <name>Rany Keddo</name>
    <email>rany@playtype.net</email>
  </author>
  <url>http://github.com/digitalhobbit/workling/commit/5b62559387aefb5c7f33a78e7207ef665c693c58</url>
  <id>5b62559387aefb5c7f33a78e7207ef665c693c58</id>
  <committed-date>2009-01-31T08:46:46-08:00</committed-date>
  <authored-date>2009-01-31T08:46:46-08:00</authored-date>
  <message>workling now throws errors in test and development. this helps for problem analysis</message>
  <tree>c16a4b9bdc224634047949121f8d90a0c63f1c37</tree>
  <committer>
    <name>Rany Keddo</name>
    <email>rany@playtype.net</email>
  </committer>
</commit>
