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:
parent
902bf9e12f
commit
98cc3d8e8b
1 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue