Mô đun:Arguments và Mô đun:Arguments/sandbox: Khác biệt giữa các trang
Giao diện
(Khác biệt giữa các trang)
Nội dung được xóa Nội dung được thêm vào
n Đã thay đổi mức khóa của “Mô đun:Arguments” ([Sửa đổi=Cấm mọi thành viên (trừ bảo quản viên)] (vô thời hạn) [Di chuyển=Cấm mọi thành viên (trừ bảo quản viên)] (vô thời hạn)) |
←Trang mới: “-- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called…” |
||
Dòng 167: | Dòng 167: | ||
if type(tidyVal) ~= 'function' then |
if type(tidyVal) ~= 'function' then |
||
error( |
error( |
||
" |
"bad value assigned to option 'valueFunc'" |
||
.. '( |
.. '(function expected, got ' |
||
.. type(tidyVal) |
.. type(tidyVal) |
||
.. ')', |
.. ')', |
||
Dòng 270: | Dòng 270: | ||
if options.readOnly then |
if options.readOnly then |
||
error( |
error( |
||
' |
'could not write to argument table key "' |
||
.. tostring(key) |
.. tostring(key) |
||
.. '"; |
.. '"; the table is read-only', |
||
2 |
2 |
||
) |
) |
||
elseif options.noOverwrite and args[key] ~= nil then |
elseif options.noOverwrite and args[key] ~= nil then |
||
error( |
error( |
||
' |
'could not write to argument table key "' |
||
.. tostring(key) |
.. tostring(key) |
||
.. '"; |
.. '"; overwriting existing arguments is not permitted', |
||
2 |
2 |
||
) |
) |