mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-11 23:35:57 +08:00
init project
This commit is contained in:
14
app/libs/wechat/error.rb
Normal file
14
app/libs/wechat/error.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class Wechat::Error < StandardError
|
||||
attr_reader :code
|
||||
|
||||
def initialize(code, message)
|
||||
super message
|
||||
@code = code
|
||||
end
|
||||
|
||||
class << self
|
||||
def parse(result)
|
||||
new(result['errcode'], result['errmsg'])
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user