we_bridge-exceptions 0.1.0 → 0.1.1

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: 72d827730814659d7d7cefe526b42d20e5ea28d3
4
- data.tar.gz: 4a0a5dcf91547e5070a0203fe09aac9dbbeef80f
3
+ metadata.gz: 02fd63c055c6a61a4a0a53ccb213ade87677ad68
4
+ data.tar.gz: 742a29e43e4daa61947d67bd93e5076942bca2fe
5
5
  SHA512:
6
- metadata.gz: 8597597e7ac6259158fb1b3a251cee1ba096e1b79a2f9f7ce45255fb328bb5c3fd838392ca5a13c6b35c2b45ca4b1e71eaa1e75638d2162ac2be074ac9373d78
7
- data.tar.gz: f3a0ffebeab725ad0a750705afe9ecb70f796501928ca6385a12ea562d21a31a08d7f1eeebcffb78d2f2c5ebdc2c479bd26d724bc081c319eeaa30fd1ae38e9c
6
+ metadata.gz: 89ca190a89438b465d91db8c487c0417fd17e765545c2a3aaabab1f9d09067db32c5a6e613d40584d7ba1c0c4225645526950a73dd62ba9ef2fcef10143421a4
7
+ data.tar.gz: dd235565a8d9b8c1cd3f9c5423db3147ba5eadc2c584a975e6baa66850e310f25072372542d3c1c0a159ee2c0c9b405475b891ddc1441fd30f0341addb760f14
@@ -57,7 +57,15 @@ module WeBridge
57
57
  end
58
58
 
59
59
  def handle_error(exception , status_code)
60
+ self.logging_on_handle_error(exception , status_code)
61
+ self.render_error(status_code)
62
+ end
63
+
64
+ def logging_on_handle_error(exception , status_code)
60
65
  logger.info "Rendering #{status_code} with exception: #{exception.message}" if exception
66
+ end
67
+
68
+ def render_error(status_code)
61
69
  render file: WeBridge::Exceptions.error_template_file_path(status_code), status: status_code, content_type: 'text/html'
62
70
  end
63
71
 
@@ -1,5 +1,5 @@
1
1
  module WeBridge
2
2
  module Exceptions
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: we_bridge-exceptions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinjiro Itagaki