#include "exception.hpp"
bw_Err bw_cef_v8exc_to_bwerr( const CefRefPtr<CefV8Exception>& exc ) {
bw_Err err;
err.code = 1; err.alloc_message = bw_Err_msg_string;
std::string error_msg = exc->GetMessage().ToString();
void* copy = malloc( error_msg.length() + 1 );
memcpy( copy, error_msg.c_str(), error_msg.length() + 1 );
err.data = copy;
return err;
}