riontel: (Default)
[personal profile] riontel
Иногда особенно очевидно, что товарищи пишущие текст сообщений об ошибке мечтают о карьере Петросяна, или кто тут у нас его эквивалент. Как вам такой экземпляр "Error: Failure reason code is 0 - SUCCESS"? Типа, посмотрите, как удачно наша программа не работает, лучше, чем какая-либо другая неработающая программа.

Date: 2007-08-10 12:16 am (UTC)
From: [identity profile] spamsink.livejournal.com
man errno:


NOTE

A common mistake is to do
              if (somecall() == -1) {
                  printf("somecall() failed\n");
                  if (errno == ...) { ... }
              }

where errno no longer needs to have the value it had upon return from somecall(). If the value of errno should be preserved across a library call, it must be saved:
              if (somecall() == -1) {
                  int errsv = errno;
                  printf("somecall() failed\n");
                  if (errsv == ...) { ... }
              }


Profile

riontel: (Default)
riontel

December 2016

S M T W T F S
    123
45678910
11121314151617
1819202122 2324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 23rd, 2025 06:38 pm
Powered by Dreamwidth Studios