Accéder au contenu.
Menu Sympa

overpass - Re: [overpass] std::bad_alloc runtime error

Objet : Overpass API developpement

Archives de la liste

Re: [overpass] std::bad_alloc runtime error


Chronologique Discussions 
  • From: mmd <>
  • To:
  • Subject: Re: [overpass] std::bad_alloc runtime error
  • Date: Sun, 17 Apr 2016 17:49:56 +0200


Hi Roland,

Am 17.04.2016 um 10:07 schrieb Roland Olbricht:
> Hi Pierre,
>
>> runtime error: Query failed with the exception: std::bad_alloc
>> Is this a bug? Or are they any options I should add to request memory or
>> other ressources?
>

>
> This is a consequence of a new sanity check. For the curious:
> https://github.com/drolbr/Overpass-API/commit/260684bdc7270dd38fecdca649c1eefd3b3ef133
>

this may be a bit nitpicking, but I find the error message "runtime
error: Query failed with the exception: std::bad_alloc" not ideal for
normal users.

Can we please have something similar to the existing error messages,
i.e. something users are already familiar with?

I'm currently thinking about the following, where "xxx" should be
replaced by the actual limit previously set via set_limits.


} catch (const std::bad_alloc& e) {
rlimit limit;
result = getrlimit(RLIMIT_AS, &limit);
...
error_output.runtime_error(std::string("Query exceeded memory
limit of xxx MB RAM."));
}



Cheers,
mmd





Archives gérées par MHonArc 2.6.18.

Haut de le page