This commit is contained in:
twinaphex 2021-04-05 17:26:43 +02:00
parent c2f658b7d0
commit 419737f18a
3 changed files with 1 additions and 41 deletions

View File

@ -2348,7 +2348,6 @@ static void CloseGame(void)
}
catch(std::exception &e)
{
log_cb(RETRO_LOG_ERROR, "%s\n", e.what());
}
}
}
@ -4264,7 +4263,6 @@ void retro_run(void)
}
catch (std::exception &e)
{
log_cb(RETRO_LOG_ERROR, "%s\n", e.what());
}
}
@ -4292,7 +4290,6 @@ void retro_run(void)
}
catch (std::exception &e)
{
log_cb(RETRO_LOG_ERROR, "%s\n", e.what());
}
}
}

View File

@ -17,6 +17,7 @@
#include "mednafen.h"
#include "error.h"
#include <errno.h>
#include <string.h>
#include <stdarg.h>
#include <libretro.h>
@ -44,39 +45,6 @@ MDFN_Error::~MDFN_Error()
error_message = NULL;
}
MDFN_Error::MDFN_Error(const MDFN_Error &ze_error)
{
if(ze_error.error_message)
error_message = strdup(ze_error.error_message);
else
error_message = NULL;
errno_code = ze_error.errno_code;
}
MDFN_Error& MDFN_Error::operator=(const MDFN_Error &ze_error)
{
char *new_error_message = ze_error.error_message ? strdup(ze_error.error_message) : NULL;
int new_errno_code = ze_error.errno_code;
if(error_message)
free(error_message);
error_message = new_error_message;
errno_code = new_errno_code;
return(*this);
}
const char * MDFN_Error::what(void)
{
if(!error_message)
return("Error allocating memory for the error message!");
return(error_message);
}
int MDFN_Error::GetErrno(void)
{
return(errno_code);

View File

@ -1,7 +1,6 @@
#ifndef __MDFN_ERROR_H
#define __MDFN_ERROR_H
#include <errno.h>
#include <string.h>
#ifdef __cplusplus
@ -16,10 +15,6 @@ class MDFN_Error
~MDFN_Error();
MDFN_Error(const MDFN_Error &ze_error);
MDFN_Error & operator=(const MDFN_Error &ze_error);
virtual const char *what(void);
int GetErrno(void);
private: