Skip to content

Commit

Permalink
Discord-bound logging errors at least to the log file
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Jul 14, 2024
1 parent e4d8d4c commit f3abe62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wheatley.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export class Wheatley {
critical_error(arg: any) {
M.error(arg);
send_long_message(this.channels.log, `🛑 Critical error occurred: ${to_string(arg)}`)
.catch(() => void 0)
.catch(() => M.error)
.finally(() => {
if (arg instanceof Error) {
Sentry.captureException(arg);
Expand All @@ -358,7 +358,7 @@ export class Wheatley {
ignorable_error(arg: any) {
M.error(arg);
send_long_message(this.channels.log, `⚠️ Ignorable error occurred: ${to_string(arg)}`)
.catch(() => void 0)
.catch(() => M.error)
.finally(() => {
if (arg instanceof Error) {
Sentry.captureException(arg);
Expand All @@ -371,7 +371,7 @@ export class Wheatley {
milestone(message: string) {
M.info(message);
send_long_message(this.channels.log, message)
.catch(() => void 0)
.catch(() => M.error)
.finally(() => {
Sentry.captureMessage(message);
});
Expand All @@ -380,7 +380,7 @@ export class Wheatley {
alert(message: string) {
M.info(message);
send_long_message(this.channels.log, message)
.catch(() => void 0)
.catch(() => M.error)
.finally(() => {
Sentry.captureMessage(message);
});
Expand Down

0 comments on commit f3abe62

Please sign in to comment.