Re: [capnproto] Custom kj exception error string

2018-02-20 Thread David Ondrušek
KJ_FAIL_REQUIRE seems like a good option, i ended up passing in the 
expression and reason along the other VA_ARGS, the output is legible enough.

Dne pondělí 19. února 2018 20:34:42 UTC+1 Kenton Varda napsal(a):
>
> Hi David,
>
> Sorry, I'm hesitant to make this interface public, since it's kind of 
> hairy and I might have to change it in the future.
>
> Your options are:
> 1) Take a risk and use it despite being private, and just deal with it if 
> it breaks someday.
> 2) Copy/paste the whole implementation out of debug.c++ into your own code.
> 3) Maybe try to implement your custom error macro in terms of 
> KJ_FAIL_REQUIRE under the hood?
>
> -Kenton
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capnproto+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.


Re: [capnproto] Custom kj exception error string

2018-02-19 Thread Kenton Varda
Hi David,

Sorry, I'm hesitant to make this interface public, since it's kind of hairy
and I might have to change it in the future.

Your options are:
1) Take a risk and use it despite being private, and just deal with it if
it breaks someday.
2) Copy/paste the whole implementation out of debug.c++ into your own code.
3) Maybe try to implement your custom error macro in terms of
KJ_FAIL_REQUIRE under the hood?

-Kenton

On Sun, Feb 18, 2018 at 2:28 AM, David Ondrušek <
david.ondru...@student.sps-cl.cz> wrote:

> Hello, i'm integrating libserialport into my project.
>
> Right now i'm trying to write something similar to KJ_WIN32 and
> KJ_WINSOCK, to get the libraries' error messages into the exception
> description.
>
> Seems like all i have to do is poke makeDescriptionImpl into a public
> namespace and copy the code that calls it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Cap'n Proto" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to capnproto+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/capnproto.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capnproto+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.