mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 06:00:35 +03:00
migrate other Phobos modules to use std.exception.basicExceptionCtors
This commit is contained in:
parent
8ddd871779
commit
5978ca7831
8 changed files with 58 additions and 154 deletions
33
std/csv.d
33
std/csv.d
|
@ -94,6 +94,7 @@ module std.csv;
|
|||
import std.conv;
|
||||
import std.range.primitives;
|
||||
import std.traits;
|
||||
import std.exception; // basicExceptionCtors
|
||||
|
||||
/**
|
||||
* Exception containing the row and column for when an exception was thrown.
|
||||
|
@ -111,20 +112,22 @@ class CSVException : Exception
|
|||
///
|
||||
size_t row, col;
|
||||
|
||||
// FIXME: Use std.exception.basicExceptionCtors here once bug #11500 is fixed
|
||||
|
||||
this(string msg, string file = __FILE__, size_t line = __LINE__,
|
||||
Throwable next = null) @safe pure
|
||||
Throwable next = null) @nogc @safe pure nothrow
|
||||
{
|
||||
super(msg, file, line, next);
|
||||
}
|
||||
|
||||
this(string msg, Throwable next, string file = __FILE__,
|
||||
size_t line = __LINE__) @safe pure
|
||||
size_t line = __LINE__) @nogc @safe pure nothrow
|
||||
{
|
||||
super(msg, file, line, next);
|
||||
}
|
||||
|
||||
this(string msg, size_t row, size_t col, Throwable next = null,
|
||||
string file = __FILE__, size_t line = __LINE__) @safe pure
|
||||
string file = __FILE__, size_t line = __LINE__) @nogc @safe pure nothrow
|
||||
{
|
||||
super(msg, next, file, line);
|
||||
this.row = row;
|
||||
|
@ -171,17 +174,7 @@ class IncompleteCellException : CSVException
|
|||
/// already been fed to the output range.
|
||||
dstring partialData;
|
||||
|
||||
this(string msg, string file = __FILE__, size_t line = __LINE__,
|
||||
Throwable next = null) @safe pure
|
||||
{
|
||||
super(msg, file, line);
|
||||
}
|
||||
|
||||
this(string msg, Throwable next, string file = __FILE__, size_t line =
|
||||
__LINE__) @safe pure
|
||||
{
|
||||
super(msg, next, file, line);
|
||||
}
|
||||
mixin basicExceptionCtors;
|
||||
}
|
||||
|
||||
@safe pure unittest
|
||||
|
@ -213,17 +206,7 @@ class IncompleteCellException : CSVException
|
|||
*/
|
||||
class HeaderMismatchException : CSVException
|
||||
{
|
||||
this(string msg, string file = __FILE__, size_t line = __LINE__,
|
||||
Throwable next = null) @safe pure
|
||||
{
|
||||
super(msg, file, line);
|
||||
}
|
||||
|
||||
this(string msg, Throwable next, string file = __FILE__,
|
||||
size_t line = __LINE__) @safe pure
|
||||
{
|
||||
super(msg, next, file, line);
|
||||
}
|
||||
mixin basicExceptionCtors;
|
||||
}
|
||||
|
||||
@safe pure unittest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue