From d5a92a315c66ca235cd4345f026d309cf68bbff4 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 28 Nov 2022 18:43:15 +0200 Subject: [PATCH] Re-named `TUNException` -> `AdapterException` --- source/libtun/adapter.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/libtun/adapter.d b/source/libtun/adapter.d index 6dadd26..9963c87 100644 --- a/source/libtun/adapter.d +++ b/source/libtun/adapter.d @@ -31,7 +31,7 @@ public class Adapter tunFD = createTun(cast(char*)interfaceName, 4096|adapterType); if(tunFD < 0) { - throw new TUNException("Error creating tun device"); + throw new AdapterException("Error creating tun device"); } /* TODO: Get device MTU and add functions for setting it */ @@ -43,7 +43,7 @@ public class Adapter { if(isClosed) { - throw new TUNException("Cannot operate on closed tunnel device"); + throw new AdapterException("Cannot operate on closed tunnel device"); } } @@ -95,7 +95,7 @@ public class Adapter if(status < 0) { - throw new TUNException("Read failed"); + throw new AdapterException("Read failed"); } else if(status == 0) { @@ -135,7 +135,7 @@ public class Adapter } -public final class TUNException : Exception +public final class AdapterException : Exception { this(string msg) {