| // This file is part of OpenCV project. | |
| // It is subject to the license terms in the LICENSE file found in the top-level directory | |
| // of this distribution and at http://opencv.org/license.html. | |
| // | |
| // Copyright (C) 2018 Intel Corporation | |
| namespace cv | |
| { | |
| namespace util | |
| { | |
| template <class ExceptionType> | |
| [[noreturn]] void throw_error(ExceptionType &&e) | |
| { | |
| throw std::forward<ExceptionType>(e); | |
| fprintf(stderr, "An exception thrown! %s\n" , e.what()); | |
| fflush(stderr); | |
| abort(); | |
| } | |
| } // namespace util | |
| } // namespace cv | |