File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1225,6 +1225,8 @@ module STACKV4_direct = struct
1225
1225
@ Impl. libraries t.network
1226
1226
@ Impl. libraries t.random
1227
1227
1228
+ let tuntap_help = " Is tun/tap enabled and have you permissions?\\ n\\ n"
1229
+
1228
1230
let configure t =
1229
1231
let name = name t in
1230
1232
Impl. configure t.clock;
@@ -1254,8 +1256,17 @@ module STACKV4_direct = struct
1254
1256
(driver_initialisation_error (Impl. name t.console));
1255
1257
append_main " | `Ok console ->" ;
1256
1258
append_main " %s () >>= function" (Impl. name t.network);
1257
- append_main " | `Error _ -> %s"
1258
- (driver_initialisation_error (Impl. name t.network));
1259
+ append_main " | `Error e ->" ;
1260
+ let name = Impl. name t.network in begin
1261
+ append_main " fail (Failure begin match e with" ;
1262
+ append_main " %s -> \"\\ n\\ n\" ^%S^\" : \" ^msg^\"\\ n%s\" "
1263
+ " | `Unknown msg" name tuntap_help;
1264
+ append_main " %s -> \"\\ n\\ n\" ^%S^\" : operation unimplemented\\ n\\ n\" "
1265
+ " | `Unimplemented" name;
1266
+ append_main " %s -> \"\\ n\\ n\" ^%S^\" : disconnected\\ n\\ n\" "
1267
+ " | `Disconnected" name;
1268
+ append_main " end)" ;
1269
+ end ;
1259
1270
append_main " | `Ok interface ->" ;
1260
1271
append_main " let config = {" ;
1261
1272
append_main " V1_LWT.name = %S;" name;
You can’t perform that action at this time.
0 commit comments