Skip to content

Commit bd6204f

Browse files
committed
Make std.string.StringException use basicExceptionCtors.
This is a trivial change to take advantage of std.exception.basicExceptionCtors and avoid having StringException explicitly declare the normal exception constructors. It also has the advantage of adding the second constructor that was missing from StringException.
1 parent f6b4e89 commit bd6204f

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

std/string.d

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,10 @@ public import std.array : join, replace, replaceInPlace, split, empty;
209209
+/
210210
class StringException : Exception
211211
{
212-
/++
213-
Params:
214-
msg = The message for the exception.
215-
file = The file where the exception occurred.
216-
line = The line number where the exception occurred.
217-
next = The previous exception in the chain of exceptions, if any.
218-
+/
219-
this(string msg,
220-
string file = __FILE__,
221-
size_t line = __LINE__,
222-
Throwable next = null) @safe pure nothrow
223-
{
224-
super(msg, file, line, next);
225-
}
212+
import std.exception : basicExceptionCtors;
213+
214+
///
215+
mixin basicExceptionCtors;
226216
}
227217

228218

0 commit comments

Comments
 (0)