tests: Print better error messages

FossilOrigin-Name: 86b43015f07361d21316dfffe78509ba117c05c598f2ccdfa1c0cec3af140ad5
This commit is contained in:
Jonathan Schleifer 2020-10-03 15:32:41 +00:00
parent ebd403b4ad
commit 023ed62f5a
3 changed files with 8 additions and 2 deletions

View file

@ -40,6 +40,6 @@ run:
${PROG_NOINST}: ${LIBOBJMATRIX_DEP}
CPPFLAGS += -I../src
CPPFLAGS += -I../src -I../src/exceptions
LIBS := -L../src -lobjmatrix ${LIBS}
LD = ${OBJC}

View file

@ -22,7 +22,7 @@
#import <ObjFW/ObjFW.h>
#import "MTXClient.h"
#import "ObjMatrix.h"
@interface Tests: OFObject <OFApplicationDelegate>
@end
@ -50,6 +50,10 @@ OF_APPLICATION_DELEGATE(Tests)
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];
}