JavaScript::Error::OpcodeLimitExceeded - Error class that is thrown when we execute too many opcodes


JavaScript-Runtime-OpcodeCounting documentation Contained in the JavaScript-Runtime-OpcodeCounting distribution.

Index


Code Index:

NAME

Top

JavaScript::Error::OpcodeLimitExceeded - Error class that is thrown when we execute too many opcodes

DESCRIPTION

Top

This special error class is thrown by a context if it's running in an JavaScript::Runtime::OpcodeCounting-runtime.

INTERFACE

Top

INSTANCE METHODS

as_string
message

Returns a string representation of the exception.


JavaScript-Runtime-OpcodeCounting documentation Contained in the JavaScript-Runtime-OpcodeCounting distribution.

package JavaScript::Error::OpcodeLimitExceeded;

use strict;
use warnings;

use overload q{""} => 'as_string', fallback => 1;

sub as_string {
	my $self = shift;
	return $self->message();
}

sub message {
	my $self = shift;
	return "Opcode limit " . $$self . " exceeded;";
}

1;
__END__