2
0
mirror of https://github.com/esiur/esiur-dart.git synced 2025-05-06 12:02:57 +00:00

Exceptions

This commit is contained in:
Ahmed Zamil 2020-02-23 12:54:01 +03:00
parent 651f8b65dd
commit 1405891985
5 changed files with 12 additions and 4 deletions

View File

@ -33,6 +33,7 @@ class AsyncQueue<T> extends AsyncReply<T>
if (_list[i].ready)
{
super.trigger(_list[i].result);
super.ready = false;
_list.removeAt(i);
i--;
}

View File

@ -50,6 +50,11 @@ class AsyncReply<T> implements Future<T>
return _resultReady;
}
set ready(value)
{
_resultReady = value;
}
T get result
{
return _result;

View File

@ -3,6 +3,8 @@ enum ExceptionCode
{
HostNotReachable,
AccessDenied,
UserNotFound,
ChallengeFailed,
ResourceNotFound,
AttachDenied,
InvalidMethod,

View File

@ -732,9 +732,9 @@ class DistributedConnection extends NetworkConnection with IStore
{
sendParams()
.addUint8(0xc0)
.addUint8(1)
.addUint16(5)
.addString("Error")
.addUint8(ExceptionCode.ChallengeFailed.index)
.addUint16(16)
.addString("Challenge Failed")
.done();
//SendParams((byte)0xc0, 1, 5, DC.ToBytes("Error"));

View File

@ -1,6 +1,6 @@
name: esyur
description: Distributed Object Framework.
version: 1.1.4
version: 1.1.5
author: Ahmed Zamil <ahmed@dijlh.com>
homepage: https://github.com/esyur/esyur-dart