Skip to content

Commit df246cf

Browse files
committed
Add debugging
1 parent fcac18c commit df246cf

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/ystdlib/error_handling/TraceableException.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <source_location>
66
#include <string>
77
#include <system_error>
8+
#include <iostream>
89

910
namespace ystdlib::error_handling {
1011
/**
@@ -25,7 +26,14 @@ class TraceableException : public std::exception, public std::source_location {
2526
std::error_code error_code,
2627
std::source_location const& location = std::source_location::current()
2728
)
28-
: TraceableException{error_code, location.function_name(), location} {}
29+
: TraceableException{error_code, location.function_name(), location} {
30+
std::cout << "HAHA: " << location.function_name() << std::endl;
31+
std::cout << "HAHA: " << location.line() << std::endl;
32+
std::cout << "HAHA: " << location.file_name() << std::endl;
33+
std::cout << "HAHA: " << function_name() << std::endl;
34+
std::cout << "HAHA: " << line() << std::endl;
35+
std::cout << "HAHA: " << file_name() << std::endl;
36+
}
2937

3038
explicit TraceableException(
3139
std::error_code error_code,

0 commit comments

Comments
 (0)