hoo added a comment.

In order for the error to be caught by pcall, you need to throw a Scribunto_LuaError rather than a ScribuntoException.

Good point, we might also want to do this… but if someone specifically wants to test whether an id is valid, going with pcall and getEntity seems like a lot of hassle (and it also means we load the whole entity in case it is valid, which might not be needed).


TASK DETAIL
https://phabricator.wikimedia.org/T143970

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: hoo
Cc: Anomie, hoo, Lucie, aude, daniel, Evad37, Aklapper, D3r1ck01, Izno, Wikidata-bugs, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to