l
Size: a a a
l
🦉
class UnderLayerError extends Error {}
class NetworkError extends Error {
constructor(type: "timeout" | "no_connection" | "broken", info) {
super(this.makeMessage(type, info)
this.type = type
this.info = info
}
}
if (error instanceof NetworkError) {
return {
error: "network", recoverable: false, retry: true
}
}
s
🦉
🦉
VK
🦉
🦉
VI
class UnderLayerError extends Error {}
class NetworkError extends Error {
constructor(type: "timeout" | "no_connection" | "broken", info) {
super(this.makeMessage(type, info)
this.type = type
this.info = info
}
}
if (error instanceof NetworkError) {
return {
error: "network", recoverable: false, retry: true
}
}
FB
class UnderLayerError extends Error {}
class NetworkError extends Error {
constructor(type: "timeout" | "no_connection" | "broken", info) {
super(this.makeMessage(type, info)
this.type = type
this.info = info
}
}
if (error instanceof NetworkError) {
return {
error: "network", recoverable: false, retry: true
}
}
AO
AO
FB
MK
d
class UnderLayerError extends Error {}
class NetworkError extends Error {
constructor(type: "timeout" | "no_connection" | "broken", info) {
super(this.makeMessage(type, info)
this.type = type
this.info = info
}
}
if (error instanceof NetworkError) {
return {
error: "network", recoverable: false, retry: true
}
}
Error.captureStackTrace(this, NetworkError)
? в своё время выстрелило при потере стэкатрейса, не забываемо, но чаще вижу без, уже не актуально?)l
Error.captureStackTrace(this, NetworkError)
? в своё время выстрелило при потере стэкатрейса, не забываемо, но чаще вижу без, уже не актуально?)🦉
🦉
🦉
VK