Skip to content
This repository has been archived by the owner on Jul 14, 2018. It is now read-only.

Commit

Permalink
deprecation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
denizzzka committed Feb 20, 2017
1 parent 816dcee commit 91cfe23
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ void main(string[] args) {
mplayer.startPlayer(api);
try
api.setLongpollWait(storage["longpoll_wait"].to!int);
catch
catch(VkException)
dbm("failed set longpoll_wait from config");
api.showConvNotifications(win.showConvNotifications);
api.sendOnline(win.sendOnline);
Expand Down
15 changes: 11 additions & 4 deletions source/vkapi.d
Original file line number Diff line number Diff line change
Expand Up @@ -2391,8 +2391,15 @@ class ClMessage : ClObject!vkMessage {
}

// ===== Exceptions =====
abstract class VkException : Exception
{
private this(string m, string f, size_t l, Throwable n) @safe pure nothrow
{
super(m, f, l, n);
}
}

class BackendException : Exception {
class BackendException : VkException {
public {
@safe pure nothrow this(string message,
string file =__FILE__,
Expand All @@ -2403,7 +2410,7 @@ class BackendException : Exception {
}
}

class NetworkException : Exception {
class NetworkException : VkException {
public {
@safe pure nothrow this(string loc,
string message = "Connection lost",
Expand All @@ -2417,7 +2424,7 @@ class NetworkException : Exception {
}


class ApiErrorException : Exception {
class ApiErrorException : VkException {
public {
int errorCode;
@safe pure nothrow this(string message,
Expand All @@ -2431,7 +2438,7 @@ class ApiErrorException : Exception {
}
}

class InternalException : Exception {
class InternalException : VkException {
public {

static const int E_NETWORKFAIL = 4;
Expand Down

0 comments on commit 91cfe23

Please sign in to comment.