Index: src/ObjMatrix.h ================================================================== --- src/ObjMatrix.h +++ src/ObjMatrix.h @@ -20,5 +20,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #import "MTXClient.h" #import "MTXRequest.h" + +#import "MTXLoginFailedException.h" Index: tests/Makefile ================================================================== --- tests/Makefile +++ tests/Makefile @@ -38,8 +38,8 @@ rm -f libobjmatrix.${OBJMATRIX_LIB_MAJOR}.dylib; \ exit $$EXIT ${PROG_NOINST}: ${LIBOBJMATRIX_DEP} -CPPFLAGS += -I../src +CPPFLAGS += -I../src -I../src/exceptions LIBS := -L../src -lobjmatrix ${LIBS} LD = ${OBJC} Index: tests/tests.m ================================================================== --- tests/tests.m +++ tests/tests.m @@ -20,11 +20,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #import -#import "MTXClient.h" +#import "ObjMatrix.h" @interface Tests: OFObject @end OF_APPLICATION_DELEGATE(Tests) @@ -48,13 +48,17 @@ homeserver: homeserver block: ^ (MTXClient *client, id exception) { if (exception != nil) { [of_stdout writeFormat: @"Error logging in: %@\n", exception]; + if ([exception isKindOfClass: + MTXLoginFailedException.class]) + [of_stdout writeFormat: @"Response: %@\n", + [exception response]]; [OFApplication terminateWithStatus: 1]; } [of_stdout writeFormat: @"Logged in client: %@\n", client]; [OFApplication terminate]; }]; } @end