weikipeng / javacpp

Automatically exported from code.google.com/p/javacpp
GNU General Public License v2.0
0 stars 0 forks source link

Compliation fails as Generator uses non-standard std::exception constructor #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use a callback with a @ByVal return type
2. Compile generated code.

What is the expected output? What do you see instead?
Expected successful compilation.
Got, compilation failure due to missing constructor on std::exception

What version of the product are you using? On what operating system?
20120512 on Android compililng on OS X with android-ndk-r7-crystax-5.beta2

Please provide any additional information below.

Generator is generating:
    throw std::exception("Return pointer address is NULL.")

It seems that std::exception does always in include the following constructors 
(see 
http://stackoverflow.com/questions/5157206/why-does-stdexception-have-extra-cons
tructors-in-vc)
    exception(const char *const&);
    exception(const char *const&, int);

Patch attached to change to runtime_error.

Original issue reported on code.google.com by richardc...@gmail.com on 23 May 2012 at 3:54

Attachments:

GoogleCodeExporter commented 9 years ago
And runtime_error is available everywhere? Looks good to me!

Original comment by samuel.a...@gmail.com on 23 May 2012 at 4:01

GoogleCodeExporter commented 9 years ago
I believe runtime_error has the string constructors as part of the standard. 

Original comment by richardc...@gmail.com on 23 May 2012 at 5:17

GoogleCodeExporter commented 9 years ago
Ok, great, fixed in the latest release. Thanks for reporting!

Original comment by samuel.a...@gmail.com on 27 May 2012 at 12:46

GoogleCodeExporter commented 9 years ago
I've verified that version 0.1 fixes the problem for me.

thanks

Richard

Original comment by richardc...@gmail.com on 28 May 2012 at 1:25