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) if (_list[i].ready)
{ {
super.trigger(_list[i].result); super.trigger(_list[i].result);
super.ready = false;
_list.removeAt(i); _list.removeAt(i);
i--; i--;
} }

View File

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

View File

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

View File

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

View File

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