using runtime error macro to signalize out-of-bound error
adding mock implementation of runtime error functions for tests