1
0
Fork 0
mirror of https://github.com/rubyjs/therubyrhino synced 2023-03-27 23:21:34 -04:00

raising from limit writers when a context is non-restrictable seems less confusing

This commit is contained in:
kares 2012-02-15 11:46:36 +01:00
parent 902bf9e12f
commit 98cc3d8e8b

View file

@ -148,9 +148,8 @@ module Rhino
if restrictable?
@native.instruction_limit = limit
else
warn "setting an instruction_limit has no effect on this context, use " +
"Context.open(:restricted => true) to gain a restrictable instance"
nil
raise "setting an instruction_limit has no effect on this context, use " +
"Context.open(:restricted => true) to gain a restrictable instance"
end
end
@ -166,9 +165,8 @@ module Rhino
if restrictable?
@native.timeout_limit = limit
else
warn "setting an timeout_limit has no effect on this context, use " +
"Context.open(:restricted => true) to gain a restrictable instance"
nil
raise "setting an timeout_limit has no effect on this context, use " +
"Context.open(:restricted => true) to gain a restrictable instance"
end
end