Fix copyright lines
[folly.git] / folly / experimental / exception_tracer / ExceptionTracer.h
index ded9a1917b6f442dde48a747e34a67a0cf132e41..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 {
@@ -31,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);
 
 /**
@@ -47,8 +52,5 @@ std::vector<ExceptionInfo> getCurrentExceptions();
  */
 void installHandlers();
 
-}  // namespace exception_tracer
-}  // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_ */
-
+} // namespace exception_tracer
+} // namespace folly