#include "REAIOSErrorHandler.h" #import #import namespace reanimated { REAIOSErrorHandler::REAIOSErrorHandler(std::shared_ptr scheduler) { this->scheduler = scheduler; error = std::make_shared(); } void REAIOSErrorHandler::raiseSpec() { if (error->handled) { return; } RCTLogError(@(error->message.c_str())); this->error->handled = true; } std::shared_ptr REAIOSErrorHandler::getScheduler() { return this->scheduler; } std::shared_ptr REAIOSErrorHandler::getError() { return this->error; } void REAIOSErrorHandler::setError(std::string message) { if (error->handled) { error->message = message; error->handled = false; } } }