1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

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

View File

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