Skip to content

Commit 3f9ac42

Browse files
committed
FIX: better SECURE error message with incorrectly formatted input block
fixes: Oldes/Rebol-issues#1255
1 parent 40083e5 commit 3f9ac42

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mezz/mezz-secure.r

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ secure: function/with [
8282

8383
; Set each policy target separately:
8484
foreach [target pol] policy [
85-
assert/type [target [word! file! url!] pol [block! word! integer!]]
85+
try/except [
86+
assert/type [target [word! file! url!] pol [block! word! integer!]]
87+
][ cause-error 'access 'security-error reduce [target pol] ]
8688
set-policy target make-policy target pol pol-obj
8789
]
8890

0 commit comments

Comments
 (0)