History

Create specific exception when index is out of range. Update thread class to print out exception details. Throw exception when an invalid op-code is detected. Enforce mspawn instruction cannot start from a built-in module.

arr committed 10 years ago

Commit 266fad61 parent 9af409310 files · +63 −40Browse files

Showing the changes to src/vm/array.cpp (1 of 10 files). Show all

Unified · Split

src/vm/array.cpp+1−1
@@ -156,7 +156,7 @@ word_t vm_array_t::get_length() const · 155 unmodified lines
156156 pointer_t vm_array_t::at(word_t index) const
157157 {
158158 if (index < 0 || _length <= index)
159− throw out_of_range_memory{ 0, _length - 1, index };
159+ throw index_out_of_range_memory{ 0, _length - 1, index };
160160
161161 return reinterpret_cast<pointer_t>(_arr + (index * _element_type->size_in_bytes));
162162 }