cesanta/mongoose — pull request #252 by dance (2013-10-20 18:54:31+00:00)
Title: Added some extended error reporting for caller's code when mg_start function fails

At the moment there is no way to determine reason of mg_start failure by the code that is calling it. The user can see cry() messages in output, still, but not the code. With this patch following would be possible:
```
context = mg_start(options, &callback, NULL);
if (!context) {
enum mg_error error = mg_get_last_error();
switch (error) {
case MG_START_LISTENING_PORTS_CANNOT_BIND:
// call mg_start again with another listening ports in options
break;
default:
fprintf(f, "mg_start() error: %s", mg_get_error_string(error));
}
}
```