4898794edd81be5285ea6e544acbedeaeb31bf78 max Tue Nov 23 08:10:57 2021 -0800 Fixing pointers to README file for license in all source code files. refs #27614 diff --git src/lib/tests/errCatchTest.c src/lib/tests/errCatchTest.c index 2f41e6b..af259f5 100644 --- src/lib/tests/errCatchTest.c +++ src/lib/tests/errCatchTest.c @@ -1,59 +1,59 @@ /* errCatchTest - test error catching by putting a wrapper * around a file read. */ /* Copyright (C) 2004 The Regents of the University of California - * See README in this or parent directory for licensing information. */ + * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "errCatch.h" void usage() /* Print usage message */ { errAbort( "errCatchTest - check error catching\n" "usage:\n" " errCatchTest password\n" "This will abort (but be caught) unless password is 'secret'\n"); } void flakyStuff(char *password) /* Count lines in file. */ { printf("Checking password %s\n", password); if (!sameString(password, "secret")) { errAbort("%s is not secret password!", password); } } void test(char *password) /* See if password works. */ { struct errCatch *errCatch = errCatchNew(); if (errCatchStart(errCatch)) { flakyStuff(password); printf("access confirmed\n"); } else { printf("access denied\n"); } errCatchEnd(errCatch); if (errCatch->gotError) printf("Caught error: %s", errCatch->message->string); else printf("You know the secret password\n"); errCatchFree(&errCatch); } int main(int argc, char *argv[]) { if (argc != 2) usage(); test(argv[1]); return 0; }