error.c
author viric@llimona
Sat, 09 Feb 2008 11:56:03 +0100
changeset 196 bca29e2a1a86
parent 146 5e689cb593aa
child 231 558b281b88f5
permissions -rw-r--r--
Fixing a bug related to a message on -t on last job, when it was skipped.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
102
27b0f0e44de8 Added copyright headers to the new files. I always forget that.
viric@llimona
parents: 92
diff changeset
     1
/*
27b0f0e44de8 Added copyright headers to the new files. I always forget that.
viric@llimona
parents: 92
diff changeset
     2
    Task Spooler - a task queue system for the unix user
27b0f0e44de8 Added copyright headers to the new files. I always forget that.
viric@llimona
parents: 92
diff changeset
     3
    Copyright (C) 2007  LluĂ­s Batlle i Rossell
27b0f0e44de8 Added copyright headers to the new files. I always forget that.
viric@llimona
parents: 92
diff changeset
     4
27b0f0e44de8 Added copyright headers to the new files. I always forget that.
viric@llimona
parents: 92
diff changeset
     5
    Please find the license in the provided COPYING file.
27b0f0e44de8 Added copyright headers to the new files. I always forget that.
viric@llimona
parents: 92
diff changeset
     6
*/
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
     7
#include <unistd.h>
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
     8
#include <stdio.h>
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
     9
#include <time.h>
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    10
#include <sys/types.h>
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    11
#include <errno.h>
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    12
#include <string.h>
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    13
#include <fcntl.h>
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    14
#include <sys/stat.h>
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    15
#include <stdarg.h>
105
98b6955472dd Fixed warning in error.c
viric@llimona
parents: 104
diff changeset
    16
#include <stdlib.h>
146
5e689cb593aa Bones of the "-i" parameter, job info.
viric@llimona
parents: 117
diff changeset
    17
#include <sys/time.h>
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    18
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    19
#include "main.h"
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    20
111
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
    21
enum Etype
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
    22
{
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
    23
    WARNING,
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
    24
    ERROR
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
    25
};
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
    26
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    27
/* Declared in main.h as extern */
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    28
enum Process_type process_type;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    29
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    30
static int real_errno;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    31
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    32
/* Local protos */
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    33
static void dump_structs(FILE *out);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    34
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    35
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    36
static void print_date(FILE *out)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    37
{
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    38
    time_t t;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    39
    const char *tstr;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    40
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    41
    t = time(NULL);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    42
    tstr = ctime(&t);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    43
104
dc4dd9939238 Fixed error reporting.
viric@llimona
parents: 102
diff changeset
    44
    fprintf(out, "date %s", tstr);
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    45
}
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    46
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    47
static void dump_proc_info(FILE *out)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    48
{
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    49
    print_date(out);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    50
    fprintf(out, "pid %i\n", getpid());
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    51
    if (process_type == SERVER)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    52
        fprintf(out, "type SERVER\n");
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    53
    else if (process_type == CLIENT)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    54
        fprintf(out, "type CLIENT\n");
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    55
    else
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    56
        fprintf(out, "type UNKNOWN\n");
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    57
}
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    58
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    59
static FILE * open_error_file()
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    60
{
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    61
    int fd;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    62
    FILE* out;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    63
104
dc4dd9939238 Fixed error reporting.
viric@llimona
parents: 102
diff changeset
    64
    fd = open("/tmp/ts.error", O_CREAT | O_APPEND | O_WRONLY, 0600);
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    65
    if (fd == -1)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    66
        return 0;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    67
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    68
    out = fdopen(fd, "a");
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    69
    if (out == NULL)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    70
    {
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    71
        close(fd);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    72
        return 0;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    73
    }
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    74
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    75
    return out;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    76
}
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    77
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    78
static void print_error(FILE *out, enum Etype type, const char *str, va_list ap)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    79
{
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    80
    if (type == ERROR)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    81
        fprintf(out, "Error\n");
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    82
    else if (type == WARNING)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    83
        fprintf(out, "Warning\n");
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    84
    else
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    85
        fprintf(out, "Unknown kind of error\n");
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    86
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    87
    fprintf(out, " Msg: ");
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    88
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    89
    vfprintf(out, str, ap);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    90
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    91
    fprintf(out, "\n");
104
dc4dd9939238 Fixed error reporting.
viric@llimona
parents: 102
diff changeset
    92
    fprintf(out, " errno %i, \"%s\"\n", real_errno, strerror(real_errno));
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    93
}
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    94
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    95
static void problem(enum Etype type, const char *str, va_list ap)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    96
{
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    97
    FILE *out;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    98
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
    99
    out = open_error_file();
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   100
    if (out == 0)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   101
        return;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   102
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   103
    /* out is ready */
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   104
    print_error(out, type, str, ap);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   105
    dump_structs(out);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   106
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   107
    /* this will close the fd also */
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   108
    fclose(out);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   109
}
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   110
111
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   111
static void problem_msg(enum Etype type, const struct msg *m, const char *str, va_list ap)
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   112
{
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   113
    FILE *out;
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   114
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   115
    out = open_error_file();
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   116
    if (out == 0)
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   117
        return;
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   118
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   119
    /* out is ready */
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   120
    print_error(out, type, str, ap);
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   121
    msgdump(out, m);
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   122
    dump_structs(out);
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   123
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   124
    /* this will close the fd also */
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   125
    fclose(out);
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   126
}
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   127
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   128
void error(const char *str, ...)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   129
{
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   130
    va_list ap;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   131
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   132
    va_start(ap, str);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   133
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   134
    real_errno = errno;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   135
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   136
    problem(ERROR, str, ap);
104
dc4dd9939238 Fixed error reporting.
viric@llimona
parents: 102
diff changeset
   137
    exit(-1);
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   138
}
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   139
111
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   140
void error_msg(const struct msg *m, const char *str, ...)
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   141
{
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   142
    va_list ap;
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   143
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   144
    va_start(ap, str);
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   145
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   146
    real_errno = errno;
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   147
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   148
    problem_msg(ERROR, m, str, ap);
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   149
    exit(-1);
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   150
}
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   151
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   152
void warning(const char *str, ...)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   153
{
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   154
    va_list ap;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   155
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   156
    va_start(ap, str);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   157
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   158
    real_errno = errno;
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   159
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   160
    problem(WARNING, str, ap);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   161
}
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   162
111
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   163
void warning_msg(const struct msg *m, const char *str, ...)
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   164
{
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   165
    va_list ap;
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   166
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   167
    va_start(ap, str);
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   168
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   169
    real_errno = errno;
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   170
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   171
    problem_msg(WARNING, m, str, ap);
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   172
}
d6bc62904b5a Fixed a buffer overflow in jobs.c, when sending the lines for LISTJOBS.
viric@mandarina
parents: 105
diff changeset
   173
92
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   174
static void dump_structs(FILE *out)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   175
{
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   176
    dump_proc_info(out);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   177
    if (process_type == SERVER)
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   178
    {
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   179
        dump_jobs_struct(out);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   180
        dump_conns_struct(out);
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   181
    }
05004c52ecff Better error reports on internal handled errors.
viric@llimona
parents:
diff changeset
   182
}