• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mbarbin / crs / 274

21 Dec 2025 08:55PM UTC coverage: 98.221% (-1.8%) from 100.0%
274

Pull #103

github

web-flow
Merge 20d267c28 into 84c356b9d
Pull Request #103: Initiate project stdlib

1 of 34 new or added lines in 3 files covered. (2.94%)

1822 of 1855 relevant lines covered (98.22%)

145.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/src/stdlib/code_error.ml
1
(********************************************************************************)
2
(*  crs - A tool for managing code review comments embedded in source code      *)
3
(*  Copyright (C) 2024-2025 Mathieu Barbin <mathieu.barbin@gmail.com>           *)
4
(*                                                                              *)
5
(*  This file is part of crs.                                                   *)
6
(*                                                                              *)
7
(*  crs is free software; you can redistribute it and/or modify it under the    *)
8
(*  terms of the GNU Lesser General Public License as published by the Free     *)
9
(*  Software Foundation either version 3 of the License, or any later version,  *)
10
(*  with the LGPL-3.0 Linking Exception.                                        *)
11
(*                                                                              *)
12
(*  crs is distributed in the hope that it will be useful, but WITHOUT ANY      *)
13
(*  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS   *)
14
(*  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License and     *)
15
(*  the file `NOTICE.md` at the root of this repository for more details.       *)
16
(*                                                                              *)
17
(*  You should have received a copy of the GNU Lesser General Public License    *)
18
(*  and the LGPL-3.0 Linking Exception along with this library. If not, see     *)
19
(*  <http://www.gnu.org/licenses/> and <https://spdx.org>, respectively.        *)
20
(********************************************************************************)
21

22
type t =
23
  { message : string
24
  ; data : (string * Dyn.t) list
25
  }
26

27
exception E of t
28

NEW
29
let raise message data = raise (E { message; data })
×
NEW
30
let to_dyn { message; data } = Dyn.Tuple [ Dyn.String message; Record data ]
×
31

32
let () =
33
  Printexc.register_printer (function
25✔
NEW
34
    | E t -> Some (Dyn.to_string (to_dyn t))
×
NEW
35
    | _ -> None)
×
36
;;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc