patronus_fati 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30a45534df56bbc7541ead1896e279e351011bfd
4
- data.tar.gz: 22a7548d50463aa2fe9ee287d9940ebfb8171073
3
+ metadata.gz: 5af36651b4ac2ef9bb6f2ed152fd34062c7d5e54
4
+ data.tar.gz: 21d48319ada17b176a06044641f20f9c52c02ec1
5
5
  SHA512:
6
- metadata.gz: c740113e2d63eec12a1c6657218b879a68476357db7511606c86d8ba69f2e70a7dd42f0d460d922f87785a914fd4b8c6177656c333ae9be9ecbcfe3d63677cba
7
- data.tar.gz: 292ef8ca17abbda49f2aec6a8948713a272aba5e4490bbacc3239da2f750c4bf2423f9b119f6df4914a5e4fb88476f651af46dd93651f8deb75fc228c50ab87a
6
+ metadata.gz: 0b2c4b99ec27244d00a1882680848c01bd53b9b4ad2db6cb6ab253bdeb7031c2a367addac2c5b9567af2a065ae7b4a053b7e919183e3061b7b2485fafb003ee9
7
+ data.tar.gz: c6d74a76140b8304237e36118637398048ae8fa9c9162f39970ff57172e38c882c9cfc5a93b96056488955744c65219f2b208b326c70a22a2c054ab83e888cfe
@@ -75,6 +75,8 @@ module PatronusFati
75
75
  if self.class.attribute_keys.include?(key.to_sym)
76
76
  @attributes[key.to_sym] = self.class.data_filter(key.to_sym, val)
77
77
  end
78
+ rescue => e
79
+ fail(PatronusFati::ParseError, format("An error occurred parsing field %s on a %s message. Value was '%s'", key, self.class.to_s, val.dump))
78
80
  end
79
81
 
80
82
  # Configure and setup the instance with all the valid parameters for
@@ -82,4 +82,8 @@ module PatronusFati
82
82
  # Number of seconds before we consider an access point no longer advertising an
83
83
  # SSID.
84
84
  SSID_EXPIRATION = 300
85
+
86
+ Error = Class.new(StandardError)
87
+ DisconnectError = Class.new(PatronusFati::Error)
88
+ ParseError = Class.new(PatronusFati::Error)
85
89
  end
@@ -29,6 +29,12 @@ module PatronusFati
29
29
  result = factory(class_to_name(message_obj), message_obj)
30
30
  cleanup_models
31
31
  result
32
+ rescue DataObjects::SyntaxError => e
33
+ # SQLite dropped our database. We need to log the condition and bail out
34
+ # of the program completely.
35
+ puts 'SQLite dropped our database: %s: %s' % [e.class, e.message]
36
+ puts 'Exiting since we don\'t have a database...'
37
+ exit 1
32
38
  rescue => e
33
39
  puts 'Error processing the following message object:'
34
40
  puts message_obj.inspect
@@ -1,3 +1,3 @@
1
1
  module PatronusFati
2
- VERSION = '0.9.10'
2
+ VERSION = '0.9.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patronus_fati
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10
4
+ version: 0.9.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stelfox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dm-constraints