dex++ 0.3.1
C++ and C API reference
Loading...
Searching...
No Matches
dex::Error Struct 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.
 

Detailed Description

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.

Member Data Documentation

◆ code

ErrorCode dex::Error::code

◆ message

std::string dex::Error::message

What failed, in words, with the path or the archive entry when there is one.

◆ problems

std::vector<Problem> dex::Error::problems = {}

For ErrorCode::InvalidModel: every problem model::validate() found.

Empty for every other code.


The documentation for this struct was generated from the following file: