tallakt-picopc 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -13,10 +13,10 @@ module PicOpc
13
13
  @cause = cause
14
14
  end
15
15
 
16
- def self.[](e)
16
+ def self.[](e, info = nil)
17
17
  raise e if e.class == PicOpcException
18
18
  e2 = new(e)
19
- raise e2, "OPC/OLE Exception: #{e.message}", e.backtrace
19
+ raise e2, "OPC/OLE Exceptioni #{info || ''}: #{e.message}", e.backtrace
20
20
  end
21
21
  end
22
22
 
@@ -47,7 +47,7 @@ module PicOpc
47
47
  end
48
48
  @prefix = options[:prefix].to_s || ''
49
49
  rescue Exception => e
50
- PicOpcException[e] # wrap all exceptions in this type
50
+ PicOpcException[ei, 'Connecting to: ' + opc_server_name] # wrap all exceptions in this type
51
51
  end
52
52
  end
53
53
 
@@ -76,7 +76,7 @@ module PicOpc
76
76
  item.read @source, return_value
77
77
  return_value.value
78
78
  rescue Exception => e
79
- PicOpcException[e] # wrap all exceptions in this type
79
+ PicOpcException[e, 'Reading tag: ' + name] # wrap all exceptions in this type
80
80
  end
81
81
  end
82
82
 
@@ -86,7 +86,7 @@ module PicOpc
86
86
  item = add_item name
87
87
  item.write value
88
88
  rescue Exception => e
89
- PicOpcException[e] # wrap all exceptions in this type
89
+ PicOpcException[e, 'Writing tag: %s with value %s' % [name.to_s, value.to_s]] # wrap all exceptions in this type
90
90
  end
91
91
  end
92
92
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tallakt-picopc}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tallak Tveide"]
12
- s.date = %q{2010-02-17}
12
+ s.date = %q{2010-02-19}
13
13
  s.description = %q{A simple DCOM OPC library for ruby that allows simple access to OPC servers but with poor efficiency}
14
14
  s.email = %q{tallak@tveide.net}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tallakt-picopc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tallak Tveide
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-17 00:00:00 +01:00
12
+ date: 2010-02-19 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency