Merge pull request #19 from thaven/fix/type-mismatch-exception

Fix: Expected and actual type swapped in TypeMismatchException
This commit is contained in:
Tristan Hume 2017-07-17 10:08:56 -07:00 committed by GitHub
commit 0f2565227f

View file

@ -139,7 +139,7 @@ T readIter(T)(DBusMessageIter *iter) if (canDBus!T) {
static if(!is(T == DBusAny) && !is(T == Variant!DBusAny)) { static if(!is(T == DBusAny) && !is(T == Variant!DBusAny)) {
auto argType = dbus_message_iter_get_arg_type(iter); auto argType = dbus_message_iter_get_arg_type(iter);
enforce(argType == typeCode!T(), enforce(argType == typeCode!T(),
new TypeMismatchException(argType, typeCode!T())); new TypeMismatchException(typeCode!T(), argType));
} }
static if(is(T==string) || is(T==ObjectPath)) { static if(is(T==string) || is(T==ObjectPath)) {
const(char)* cStr; const(char)* cStr;