Fix copyright lines
[folly.git] / folly / experimental / exception_tracer / ExceptionTracer.h
index b742f190c6c779880136b924929c2f0658b7055f..65869839611432cb3daae60097ce2fc3ed53d897 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2012 Facebook, Inc.
+ * Copyright 2012-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 //
 // Exception tracer library.
 
-#ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_
-#define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_
+#pragma once
 
+#include <cstdint>
+#include <iosfwd>
+#include <typeinfo>
 #include <vector>
-#include <iostream>
 
+namespace folly {
 namespace exception_tracer {
 
 struct ExceptionInfo {
@@ -30,9 +32,13 @@ struct ExceptionInfo {
   // The values in frames are IP (instruction pointer) addresses.
   // They are only filled if the low-level exception tracer library is
   // linked in or LD_PRELOADed.
-  std::vector<uintptr_t> frames;  // front() is top of stack
+  std::vector<uintptr_t> frames; // front() is top of stack
 };
 
+void printExceptionInfo(
+    std::ostream& out,
+    const ExceptionInfo& info,
+    int options);
 std::ostream& operator<<(std::ostream& out, const ExceptionInfo& info);
 
 /**
@@ -46,7 +52,5 @@ std::vector<ExceptionInfo> getCurrentExceptions();
  */
 void installHandlers();
 
-}  // namespace exception_tracer
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_ */
-
+} // namespace exception_tracer
+} // namespace folly