|
dex++ 0.3.1
C++ and C API reference
|
Why a call failed. More...
#include <common/error.hpp>
Public Attributes | |
| ErrorCode | code |
| std::string | message |
| What failed, in words, with the path or the archive entry when there is one. | |
| std::vector< Problem > | problems = {} |
| For ErrorCode::InvalidModel: every problem model::validate() found. | |
Why a call failed.
The same type comes back from every part of the library: the analysis and APK loaders, the binary XML and resource table parsers, and the editable model. So one function can load an APK, read a DEX file into a model and write it again, and return a single std::expected<T, Error>.
The library does not throw for bad input; it returns an Error. A lookup that finds nothing is not an error: it returns an empty result or std::nullopt.
| ErrorCode dex::Error::code |
| std::string dex::Error::message |
What failed, in words, with the path or the archive entry when there is one.
| std::vector<Problem> dex::Error::problems = {} |
For ErrorCode::InvalidModel: every problem model::validate() found.
Empty for every other code.