Ignore:
Timestamp:
Aug 28, 2011 11:18:23 AM (12 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/pymolproxy/pymolproxy.c

    r2419 r2427  
    675675#endif
    676676            if (nWritten < 0) {
    677                 ERROR("Error writing fd(%d), %d/%s.", fd, errno,
    678                       strerror(errno));
     677                ERROR("Error writing fd=%d, %s", fd, strerror(errno));
    679678                return;
    680679            }
     
    725724    nWritten = write(proxyPtr->sin, buffer, length);
    726725    if (nWritten != length) {
    727         ERROR("short write to pymol (wrote=%d, should have been %d)",
    728               nWritten, length);
     726        ERROR("short write to pymol (wrote=%d, should have been %d): %s",
     727              nWritten, length, strerror(errno));
    729728    }
    730729    for (p = buffer; *p != '\0'; p++) {
     
    738737    result = Expect(proxyPtr, expect, buffer, BUFSIZ);
    739738    if (result == BUFFER_ERROR) {
    740         ERROR("timeout reading data (buffer=%s)", buffer);
     739        ERROR("timeout reading data (buffer=%s): %s", buffer, strerror(errno));
    741740        proxyPtr->error = 1;
    742741        proxyPtr->status = TCL_ERROR;
     
    864863    strcpy(imgPtr->data, buffer);
    865864    if (GetBytes(&proxyPtr->server, imgPtr->data + length, nBytes)!=BUFFER_OK){
    866         ERROR("can't read %d bytes for \"image follows\" buffer", nBytes);
     865        ERROR("can't read %d bytes for \"image follows\" buffer: %s", nBytes,
     866              strerror(errno));
    867867        return  TCL_ERROR;
    868868    }
     
    13441344    strcpy(imgPtr->data, buffer);
    13451345    if (GetBytes(&proxyPtr->server, imgPtr->data + length, nBytes)!=BUFFER_OK){
    1346         ERROR("can't read %d bytes for \"image follows\" buffer", nBytes);
     1346        ERROR("can't read %d bytes for \"image follows\" buffer: %s", nBytes,
     1347              strerror(errno));
    13471348        return  TCL_ERROR;
    13481349    }
     
    14081409    strcpy(imgPtr->data, buffer);
    14091410    if (GetBytes(&proxyPtr->server, imgPtr->data + length, nBytes)!=BUFFER_OK){
    1410         ERROR("can't read %d bytes for \"image follows\" buffer", nBytes);
     1411        ERROR("can't read %d bytes for \"image follows\" buffer: %s", nBytes,
     1412              strerror(errno));
    14111413        return  TCL_ERROR;
    14121414    }
     
    20002002       
    20012003        execvp(argv[0], argv);
    2002         ERROR("Failed to start pymol `%s'", argv[0]);
     2004        ERROR("can't exec `%s': %s", argv[0], strerror(errno));
    20032005        exit(-1);
    20042006    }
     
    21652167                Debug("Done with pymol stdout\n");
    21662168            } else {
    2167                 ERROR("Failed reading pymol stdout (nBytes=%d)\n", nBytes);
     2169                ERROR("can't read pymol stdout (nBytes=%d): %s\n", nBytes,
     2170                      strerror(errno));
    21682171                goto error;             /* Get out on EOF or error. */
    21692172            }
     
    21822185                      strerror(errno));
    21832186                if (errno != EINTR) {
    2184                     ERROR("lost connection (stderr) to pymol server.");
     2187                    ERROR("lost connection (stderr) to pymol server: %s",
     2188                          strerror(errno));
    21852189                    goto error;
    21862190                }
     
    22142218                    break;
    22152219                }
    2216                 ERROR("Failed reading client stdout (nBytes=%d)\n", nBytes);
     2220                ERROR("can't read client stdout (nBytes=%d): %s\n", nBytes,
     2221                      strerror(errno));
    22172222                goto error;             /* Get out on EOF or error. */
    22182223            }
Note: See TracChangeset for help on using the changeset viewer.