Try to ensure recovered panics still print stack traces
This commit is contained in:
parent
7413163df2
commit
db53b95ab1
2
go.mod
2
go.mod
@ -12,7 +12,7 @@ require (
|
|||||||
maunium.net/go/mauflag v1.0.0
|
maunium.net/go/mauflag v1.0.0
|
||||||
maunium.net/go/maulogger/v2 v2.0.0
|
maunium.net/go/maulogger/v2 v2.0.0
|
||||||
maunium.net/go/mautrix v0.1.0-alpha.3.0.20190825132810-9d870654e9d2
|
maunium.net/go/mautrix v0.1.0-alpha.3.0.20190825132810-9d870654e9d2
|
||||||
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190825132837-ffcc1e3c7ed7
|
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190830063827-e7dcd7e42e7c
|
||||||
)
|
)
|
||||||
|
|
||||||
replace (
|
replace (
|
||||||
|
2
go.sum
2
go.sum
@ -62,3 +62,5 @@ maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190824195529-3507711d75aa h
|
|||||||
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190824195529-3507711d75aa/go.mod h1:PZTnFsEUt4YALO/OGGyWXeQulBVGEPjI8FQ88XCbu/w=
|
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190824195529-3507711d75aa/go.mod h1:PZTnFsEUt4YALO/OGGyWXeQulBVGEPjI8FQ88XCbu/w=
|
||||||
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190825132837-ffcc1e3c7ed7 h1:0B3zGyfNVxdCcoFDgvDh8CW9U0gkCDvwKbP0a0UIUEQ=
|
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190825132837-ffcc1e3c7ed7 h1:0B3zGyfNVxdCcoFDgvDh8CW9U0gkCDvwKbP0a0UIUEQ=
|
||||||
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190825132837-ffcc1e3c7ed7/go.mod h1:FJRRpH5+p3wCfEt6u/3kMeu9aGX/pk2PqtvjRDRW74w=
|
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190825132837-ffcc1e3c7ed7/go.mod h1:FJRRpH5+p3wCfEt6u/3kMeu9aGX/pk2PqtvjRDRW74w=
|
||||||
|
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190830063827-e7dcd7e42e7c h1:jt0i4ZkHikhy0T5Lxe+ApvLChy1MdloxGjs/kaImHD4=
|
||||||
|
maunium.net/go/mautrix-appservice v0.1.0-alpha.3.0.20190830063827-e7dcd7e42e7c/go.mod h1:FJRRpH5+p3wCfEt6u/3kMeu9aGX/pk2PqtvjRDRW74w=
|
||||||
|
2
user.go
2
user.go
@ -460,7 +460,7 @@ func (user *User) updateLastConnectionIfNecessary() {
|
|||||||
|
|
||||||
func (user *User) HandleError(err error) {
|
func (user *User) HandleError(err error) {
|
||||||
if errors.Cause(err) != whatsapp.ErrInvalidWsData {
|
if errors.Cause(err) != whatsapp.ErrInvalidWsData {
|
||||||
user.log.Errorln("WhatsApp error:", err)
|
user.log.Errorfln("WhatsApp error: %v", err)
|
||||||
}
|
}
|
||||||
if closed, ok := err.(*whatsapp.ErrConnectionClosed); ok {
|
if closed, ok := err.(*whatsapp.ErrConnectionClosed); ok {
|
||||||
if closed.Code == 1000 && user.cleanDisconnection {
|
if closed.Code == 1000 && user.cleanDisconnection {
|
||||||
|
Loading…
Reference in New Issue
Block a user