Skip to content

Commit 8373dd3

Browse files
authored
Fix error message type (#955)
## Changes Error's Luau type def is `<T>(message: T, level: number): never`, not `(message: string, level: number): never`. It works as expected by throwing the passed object instead of a string. I haven't updated the summary text as this is (mostly) correct. ![image](https://github.com/user-attachments/assets/f93fabdb-d533-4090-aa8f-7a3b79d894a2) ![image](https://github.com/user-attachments/assets/e146f215-7a4e-4c01-a102-af16f24fed68) ## Checks By submitting your pull request for review, you agree to the following: - [x] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [x] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [x] To the best of my knowledge, all proposed changes are accurate.
1 parent 6164280 commit 8373dd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/en-us/reference/engine/globals/LuaGlobals.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ functions:
9595
position information to the message.
9696
parameters:
9797
- name: message
98-
type: string
98+
type: Variant
9999
default:
100100
summary: |
101101
The error message to display.

0 commit comments

Comments
 (0)