tests: Print better error messages
FossilOrigin-Name: 86b43015f07361d21316dfffe78509ba117c05c598f2ccdfa1c0cec3af140ad5
This commit is contained in:
parent
ebd403b4ad
commit
023ed62f5a
3 changed files with 8 additions and 2 deletions
|
@ -22,3 +22,5 @@
|
|||
|
||||
#import "MTXClient.h"
|
||||
#import "MTXRequest.h"
|
||||
|
||||
#import "MTXLoginFailedException.h"
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue