yum-archive/TaSTT-Whisper
High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model
git clone https://git.yummers.dev/yum-archive/TaSTT-Whisper
8c4603c
master
1#pragma once 2 3namespace ComLight 4{ 5class Exception :public std::runtime_error 6 { 7// I don't like C++ exceptions too much, but for some cases they are useful. 8// You can throw ComLight::Exception from constructor, or from FinalConstruct() method, the library will catch & return the code from the class factory function. 9// Unfortunately, for interface methods this doesn't work, the C++ parts of the library can't catch them without very complex trickery like code generation. 10// You can still use this class in methods, but you'll need to catch them manually near the API boundary or the app will crash. 11// C++ doesn't have an ABI, the framework can't catch C++ exception across the modules. 12const HRESULT m_code ; 13 14public : 15 16Exception (HRESULT hr ) :runtime_error ("ComLight HRESULT exception" ),m_code (hr ) { } 17 18HRESULT code ()const {return m_code ; } 19 }; 20}