Skip to content

Commit

Permalink
Fix building TelegramException in getCommandsList()
Browse files Browse the repository at this point in the history
This fix the following TypeError:

Exception::__construct():
Argument #2 ($code) must be of type int, Exception given
  • Loading branch information
mlocati committed Oct 24, 2023
1 parent da45ae5 commit 54e86c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Telegram.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public function getCommandsList(): array
}
}
} catch (Exception $e) {
throw new TelegramException('Error getting commands from path: ' . $path, $e);
throw new TelegramException('Error getting commands from path: ' . $path, $e->getCode(), $e);
}
}

Expand Down

0 comments on commit 54e86c2

Please sign in to comment.