File tree 7 files changed +52
-45
lines changed
7 files changed +52
-45
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,8 @@ core/js_long.cmx : core/js_exp_make.cmx common/js_config.cmx core/j.cmx \
201
201
core/js_main.cmx : core/ocaml_parse.cmx core/ocaml_options.cmx \
202
202
core/ocaml_batch_compile.cmx core/js_implementation.cmx \
203
203
common/js_config.cmx ext/ext_string.cmx ext/ext_filename.cmx \
204
- common/bs_pkg.cmx core/bs_conditional_initial.cmx core/js_main.cmi
204
+ common/bs_pkg.cmx common/bs_exception.cmx core/bs_conditional_initial.cmx \
205
+ core/js_main.cmi
205
206
core/js_map.cmx : core/j.cmx
206
207
core/js_number.cmx : core/js_number.cmi
207
208
core/js_of_lam_array.cmx : core/js_exp_make.cmx core/js_of_lam_array.cmi
Original file line number Diff line number Diff line change @@ -1624,7 +1624,14 @@ type error =
1624
1624
| Bs_package_not_found of string
1625
1625
| Bs_main_not_exist of string
1626
1626
| Bs_invalid_path of string
1627
-
1627
+ (*
1628
+ TODO: In the futrue, we should refine dependency [bsb]
1629
+ should not rely on such exception, it should have its own exception handling
1630
+ *)
1631
+
1632
+ exception Error of error
1633
+
1634
+ val report_error : Format .formatter -> error -> unit
1628
1635
val error : error -> 'a
1629
1636
1630
1637
end = struct
@@ -1689,16 +1696,6 @@ let report_error ppf = function
1689
1696
| Bs_invalid_path path
1690
1697
-> Format. pp_print_string ppf (" Invalid path: " ^ path )
1691
1698
1692
- (* *
1693
- FIXME: this introduces dependencies on compiler-libs
1694
- let () =
1695
- Location.register_error_of_exn
1696
- (function
1697
- | Error err
1698
- -> Some (Location.error_of_printer_file report_error err)
1699
- | _ -> None
1700
- )
1701
- *)
1702
1699
1703
1700
1704
1701
end
Original file line number Diff line number Diff line change @@ -4420,7 +4420,14 @@ type error =
4420
4420
| Bs_package_not_found of string
4421
4421
| Bs_main_not_exist of string
4422
4422
| Bs_invalid_path of string
4423
-
4423
+ (*
4424
+ TODO: In the futrue, we should refine dependency [bsb]
4425
+ should not rely on such exception, it should have its own exception handling
4426
+ *)
4427
+
4428
+ exception Error of error
4429
+
4430
+ val report_error : Format.formatter -> error -> unit
4424
4431
val error : error -> 'a
4425
4432
4426
4433
end = struct
@@ -4485,16 +4492,6 @@ let report_error ppf = function
4485
4492
| Bs_invalid_path path
4486
4493
-> Format.pp_print_string ppf ("Invalid path: " ^ path )
4487
4494
4488
- (**
4489
- FIXME: this introduces dependencies on compiler-libs
4490
- let () =
4491
- Location.register_error_of_exn
4492
- (function
4493
- | Error err
4494
- -> Some (Location.error_of_printer_file report_error err)
4495
- | _ -> None
4496
- )
4497
- *)
4498
4495
4499
4496
4500
4497
end
Original file line number Diff line number Diff line change @@ -19861,7 +19861,14 @@ type error =
19861
19861
| Bs_package_not_found of string
19862
19862
| Bs_main_not_exist of string
19863
19863
| Bs_invalid_path of string
19864
-
19864
+ (*
19865
+ TODO: In the futrue, we should refine dependency [bsb]
19866
+ should not rely on such exception, it should have its own exception handling
19867
+ *)
19868
+
19869
+ exception Error of error
19870
+
19871
+ val report_error : Format.formatter -> error -> unit
19865
19872
val error : error -> 'a
19866
19873
19867
19874
end = struct
@@ -19926,16 +19933,6 @@ let report_error ppf = function
19926
19933
| Bs_invalid_path path
19927
19934
-> Format.pp_print_string ppf ("Invalid path: " ^ path )
19928
19935
19929
- (**
19930
- FIXME: this introduces dependencies on compiler-libs
19931
- let () =
19932
- Location.register_error_of_exn
19933
- (function
19934
- | Error err
19935
- -> Some (Location.error_of_printer_file report_error err)
19936
- | _ -> None
19937
- )
19938
- *)
19939
19936
19940
19937
19941
19938
end
@@ -99381,6 +99378,15 @@ let set_eval_string s =
99381
99378
eval_string := s
99382
99379
99383
99380
99381
+
99382
+ let () =
99383
+ Location.register_error_of_exn
99384
+ (function
99385
+ | Bs_exception.Error err
99386
+ -> Some (Location.error_of_printer_file Bs_exception.report_error err)
99387
+ | _ -> None
99388
+ )
99389
+
99384
99390
let (//) = Filename.concat
99385
99391
99386
99392
let add_package s =
Original file line number Diff line number Diff line change @@ -58,14 +58,4 @@ let report_error ppf = function
58
58
| Bs_invalid_path path
59
59
-> Format. pp_print_string ppf (" Invalid path: " ^ path )
60
60
61
- (* *
62
- FIXME: this introduces dependencies on compiler-libs
63
- let () =
64
- Location.register_error_of_exn
65
- (function
66
- | Error err
67
- -> Some (Location.error_of_printer_file report_error err)
68
- | _ -> None
69
- )
70
- *)
71
61
Original file line number Diff line number Diff line change @@ -29,5 +29,12 @@ type error =
29
29
| Bs_package_not_found of string
30
30
| Bs_main_not_exist of string
31
31
| Bs_invalid_path of string
32
-
32
+ (*
33
+ TODO: In the futrue, we should refine dependency [bsb]
34
+ should not rely on such exception, it should have its own exception handling
35
+ *)
36
+
37
+ exception Error of error
38
+
39
+ val report_error : Format .formatter -> error -> unit
33
40
val error : error -> 'a
Original file line number Diff line number Diff line change @@ -61,6 +61,15 @@ let set_eval_string s =
61
61
eval_string := s
62
62
63
63
64
+
65
+ let () =
66
+ Location. register_error_of_exn
67
+ (function
68
+ | Bs_exception. Error err
69
+ -> Some (Location. error_of_printer_file Bs_exception. report_error err)
70
+ | _ -> None
71
+ )
72
+
64
73
let (// ) = Filename. concat
65
74
66
75
let add_package s =
You can’t perform that action at this time.
0 commit comments