1 //===- Error.h - system_error extensions for PDB ----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_PDB_ERROR_H
11 #define LLVM_DEBUGINFO_PDB_ERROR_H
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/Support/Error.h"
19 enum class generic_error_code {
22 type_server_not_found,
26 /// Base class for errors originating when parsing raw PDB files
27 class GenericError : public ErrorInfo<GenericError> {
30 GenericError(generic_error_code C);
31 GenericError(StringRef Context);
32 GenericError(generic_error_code C, StringRef Context);
34 void log(raw_ostream &OS) const override;
35 StringRef getErrorMessage() const;
36 std::error_code convertToErrorCode() const override;
40 generic_error_code Code;