Project
Loading...
Searching...
No Matches
ErrorHandling.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#ifndef ALICEO2_FOCAL_ERRORHANDLING_H
12#define ALICEO2_FOCAL_ERRORHANDLING_H
13#include <exception>
14#include <iosfwd>
15#include <string>
16
17namespace o2::focal
18{
19class IndexExceptionEvent : public std::exception
20{
21 public:
29 IndexExceptionEvent(unsigned int index, unsigned int maxindex, IndexType_t source);
30 ~IndexExceptionEvent() noexcept final = default;
31
32 const char* what() const noexcept final;
33
34 unsigned int getIndex() const noexcept { return mIndex; }
35 unsigned int getMaxIndex() const noexcept { return mMaxIndex; }
36 IndexType_t getSource() const noexcept { return mSource; }
37
38 private:
39 unsigned int mIndex;
40 unsigned int mMaxIndex;
41 IndexType_t mSource;
42 std::string mMessageBuffer;
43};
44
45std::ostream& operator<<(std::ostream& in, const IndexExceptionEvent& error);
46
47} // namespace o2::focal
48
49#endif
unsigned int getIndex() const noexcept
const char * what() const noexcept final
~IndexExceptionEvent() noexcept final=default
IndexType_t getSource() const noexcept
unsigned int getMaxIndex() const noexcept
GLuint index
Definition glcorearb.h:781
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
std::ostream & operator<<(std::ostream &in, const IndexExceptionEvent &error)