Reviewed By: ddino Differential Revision: D6899312 fbshipit-source-id: f063251master
parent
f1e01bdfc7
commit
8053734563
@ -0,0 +1,24 @@
|
|||||||
|
(*
|
||||||
|
* Copyright (c) 2018 - present Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*)
|
||||||
|
open! IStd
|
||||||
|
module F = Format
|
||||||
|
|
||||||
|
let log_caught_exception (trans_unit_ctx: CFrontend_config.translation_unit_context) exception_type
|
||||||
|
(exception_file, exception_line, _, _) (source_location_start, source_location_end) ast_node =
|
||||||
|
let caught_exception =
|
||||||
|
EventLogger.FrontendException
|
||||||
|
{ exception_type
|
||||||
|
; source_location_start= CLocation.clang_to_sil_location trans_unit_ctx source_location_start
|
||||||
|
; source_location_end= CLocation.clang_to_sil_location trans_unit_ctx source_location_end
|
||||||
|
; exception_file
|
||||||
|
; exception_line
|
||||||
|
; ast_node
|
||||||
|
; lang= CFrontend_config.string_of_clang_lang trans_unit_ctx.lang }
|
||||||
|
in
|
||||||
|
EventLogger.log caught_exception
|
@ -0,0 +1,14 @@
|
|||||||
|
(*
|
||||||
|
* Copyright (c) 2018 - present Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*)
|
||||||
|
|
||||||
|
open! IStd
|
||||||
|
|
||||||
|
val log_caught_exception :
|
||||||
|
CFrontend_config.translation_unit_context -> string -> CFrontend_config.ocaml_pos
|
||||||
|
-> Clang_ast_t.source_location * Clang_ast_t.source_location -> string option -> unit
|
Loading…
Reference in new issue