Changeset 6311


Ignore:
Timestamp:
Feb 11, 2009, 2:36:19 PM (16 years ago)
Author:
rwilson
Message:

Give more information on failure to open file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/urs_ext.c

    r5972 r6311  
    99#include "math.h"
    1010#include <stdio.h>
     11#include <string.h>
     12#include <errno.h>
    1113#include <float.h>
    1214#include <time.h>
     
    219221        if((fp = fopen(muxFileName, "r")) == NULL)
    220222        {
    221             fprintf(stderr, "cannot open file %s\n", muxFileName);
     223            char *err_msg = strerror(errno);
     224
     225            fprintf(stderr, "cannot open file '%s': %s\n", muxFileName, err_msg);
    222226            return -1; 
    223227        }
Note: See TracChangeset for help on using the changeset viewer.