Add trace load failure exception.

This commit is contained in:
Bartosz Taudul 2023-12-31 13:55:06 +01:00
parent d64307be91
commit 5062bef69a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,8 @@
#ifndef __TRACYBADVERSION_HPP__
#define __TRACYBADVERSION_HPP__
#include <string>
#include "../public/common/TracyForceInline.hpp"
struct ImFont;
@ -16,11 +18,13 @@ struct BadVersionState
BadFile,
ReadError,
UnsupportedVersion,
LegacyVersion
LegacyVersion,
LoadFailure
};
State state = Ok;
int version = 0;
std::string msg;
};
namespace detail

View File

@ -64,6 +64,12 @@ struct LegacyVersion : public std::exception
int version;
};
struct LoadFailure : public std::exception
{
LoadFailure( const char* msg ) : msg( msg ) {}
std::string msg;
};
struct LoadProgress
{
enum Stage