ztk 1.19.1 → 1.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2be8031cf0a89f4521385d7d779905354679bea
4
- data.tar.gz: c3a9399174251e7e3f23fb11422afa2615a8f2e5
3
+ metadata.gz: 03cf80347fd94de831b81ab1ff3f8691ad5e1f78
4
+ data.tar.gz: 027e70a20091498e07e1c9d3775aacac8a1efa3d
5
5
  SHA512:
6
- metadata.gz: 7685ebf8df1e448c157130bcc4f9641ab5c783de3871a09395848afb3a0f2b52d648310a87a735be4997fcf5987142a69ee498f1c815b7db8d07ed4f7ae264dd
7
- data.tar.gz: 51437543f474ea667c78ceebdb1aeb4f558d13d0b4df618105a10f9f86848027a81f0f22b68d1218c87b4dff1b8c7e7b2eae722ee4427233000452afca6c96c3
6
+ metadata.gz: cb9ed8fea1f649dfb232079abda6aa94ee4bd038d3c18991d1a3429f8db402f2a8cdf60f1ffe6be65ee416f3231b6db9a7f813a898b5fcea492516cf4bead281
7
+ data.tar.gz: 7df424f31235d4c0bf6cbb4fd392d9c7580bf66c05dd0580479abef1222b527cc205597dce67efe71bce02ea42cee865da998f57ed338af80bde8666648a8c59
data/lib/ztk/parallel.rb CHANGED
@@ -185,6 +185,11 @@ module ZTK
185
185
  begin
186
186
  data = block.call
187
187
  rescue Exception => e
188
+ config.ui.logger.fatal { e.message }
189
+ e.backtrace.each do |line|
190
+ config.ui.logger << line
191
+ config.ui.logger << "\n"
192
+ end
188
193
  data = ExceptionWrapper.new(e)
189
194
  end
190
195
 
@@ -288,13 +293,13 @@ module ZTK
288
293
  def process_data(data)
289
294
  return data if !(ZTK::Parallel::ExceptionWrapper === data)
290
295
 
291
- config.ui.logger.fatal { "exception(#{data.exception.inspect})" }
292
-
293
- if (config.raise_exceptions == true)
296
+ if ((config.raise_exceptions == true) || (ZTK::Parallel::Break === data.exception))
297
+ config.ui.logger.fatal { "exception(#{data.exception.inspect})" }
294
298
  signal_all
295
299
  raise data.exception
296
300
  end
297
301
 
302
+ config.ui.logger.warn { "exception(#{data.exception.inspect})" }
298
303
  return data.exception
299
304
  end
300
305
 
data/lib/ztk/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module ZTK
2
2
 
3
3
  # ZTK Version String
4
- VERSION = "1.19.1"
4
+ VERSION = "1.19.2"
5
5
 
6
6
  end
@@ -96,6 +96,20 @@ describe ZTK::Parallel do
96
96
  }.should_not raise_error
97
97
  end
98
98
 
99
+ it "should not ignore ZTK::Parallel::Break exceptions" do
100
+ subject = ZTK::Parallel.new(:raise_exceptions => false)
101
+
102
+ lambda {
103
+ 3.times do |x|
104
+ subject.process do
105
+ raise ZTK::Parallel::Break
106
+ end
107
+ end
108
+
109
+ subject.waitall
110
+ }.should raise_error
111
+ end
112
+
99
113
  end
100
114
 
101
115
  describe "#wait" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ztk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.1
4
+ version: 1.19.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Patten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport