*** FaTony has joined #kxstudio | 00:49 | |
*** Aria22 is now known as Aria22|away | 00:49 | |
FaTony | falktx, what will happen if I throw an exception to DPF? | 00:50 |
---|---|---|
jim | falktx, hi... just to let you know, I'm preppiing for an event, so I been scarce... meanwhile, here is the lintian report on the debianized source package... it's fairly short (3 items iirc); fairly easy to take care of. tap me on the shoulder if you have any questions about it | 01:20 |
jim | http://paste.debian.net/739294/ | 01:20 |
*** ArturSha1 has joined #kxstudio | 02:35 | |
*** Aria22|away is now known as Aria | 03:20 | |
*** bill-auger has joined #kxstudio | 03:48 | |
*** Krew has quit IRC | 04:09 | |
*** rto has quit IRC | 04:38 | |
*** bill-auger_ has joined #kxstudio | 04:57 | |
*** Yruama_Lairba has quit IRC | 05:12 | |
*** wolftune has quit IRC | 05:36 | |
falktx | FaTony: exception when? | 05:46 |
falktx | FaTony: there are hosts made in C. try your best NEVER to throw exceptions on plugins | 05:46 |
falktx | that's very nasty behaviour for plugins | 05:47 |
FaTony | ok | 05:53 |
jim | how do you throw an exception in C? | 07:19 |
bill-auger | std::exception | 07:24 |
bill-auger | o/c your fav framework may have its own | 07:24 |
*** falktx|work has joined #kxstudio | 07:28 | |
jim | I thought that was c++ | 07:43 |
jim | so, you're saying gcc (the c compiler) has that syntax, which looks like it's putting together an exception object) | 07:44 |
jim | ? | 07:44 |
falktx|work | is that for me? | 07:53 |
jim | you could field it if you have the answer handy | 08:07 |
falktx|work | I think I missed the context | 08:08 |
jim | and, it's just idle curiousity on my part, not really important... | 08:08 |
jim | well the context is "exceptions in c (as opposed to c++)" | 08:08 |
jim | and it's just that I didn't know they were possible | 08:09 |
falktx|work | well, the thing is, a plugin is a shared object loaded by a host | 08:14 |
falktx|work | if the host is written in c, it doesn't have the try();catch that c++ has | 08:15 |
falktx|work | so if a plugin throws some exception, I don't think the c-code host can catch it | 08:15 |
falktx|work | but anyway, throwing exception in *plugins* is NOT EVER a good idea | 08:16 |
falktx|work | same thing applies to using statics and global variables on *plugins* | 08:16 |
falktx|work | it's fine for standalone apps, but not for plugins | 08:16 |
*** olinuxx has joined #kxstudio | 08:45 | |
*** olinuxx has joined #kxstudio | 08:45 | |
FaTony | falktx|work, I suggest putting try/catch block around calls to DPF plugin and have them output something to a log file or whatever | 08:58 |
FaTony | because idiomatic RAII is to throw exception if constructor fails to establish the invariant | 08:59 |
falktx|work | if you do it like me, and design your code to be noexcept-safe, you won't have issues | 09:00 |
falktx|work | I never liked the throw concept | 09:00 |
*** DoverMo has joined #kxstudio | 09:01 | |
FaTony | noexcept-safe? wtf is that? | 09:01 |
falktx|work | make sure your functions never throw, then you can add the noexcept "decorator" | 09:04 |
falktx|work | http://en.cppreference.com/w/cpp/language/noexcept_spec | 09:04 |
LAbot | Title: noexcept specifier (since C++11) - cppreference.com (at en.cppreference.com) | 09:04 |
falktx|work | FaTony: it's like the "override" specifier, but for different purposes of course | 09:05 |
FaTony | falktx|work, I know what noexcept is but exception ARE the way to handle error conditions | 09:06 |
falktx|work | well, I dislike them :) | 09:07 |
falktx|work | very tricky to handle in mixed c++ + python code | 09:07 |
falktx|work | and also difficult or impossible for C code | 09:07 |
FaTony | falktx|work, certainly a problem for other languges, that's why I don't use them | 09:08 |
falktx|work | I'm not one of those devs that likes all the new c++ stuff. I still love C, just want a little extra features from c++ | 09:08 |
FaTony | I embrace modern c++ to it's fullest | 09:09 |
DoverMo | C++18 | 09:09 |
falktx|work | no, not for me | 09:09 |
falktx|work | I imagine constant try/catch on all functions cause a small perfomance impact | 09:09 |
falktx|work | also, try/catch doesn't sound RT-safe | 09:10 |
falktx|work | if you post in LAD that you want to throw exceptions on your plugins, they might kill you ;) | 09:11 |
FaTony | falktx|work, you only put try/catch where you can handle errors, I barely put them in my code | 09:11 |
FaTony | whatever, I use c++14 freely | 09:11 |
falktx|work | I think in the constructor is fine. but nowhere else | 09:11 |
DoverMo | trying to decide between recording or sleeping | 09:12 |
FaTony | falktx|work, how would you signal error then? return code? | 09:12 |
falktx|work | why is there an error? | 09:12 |
falktx|work | you need to think of a C API way. if the plugin has an error, it needs to report to the host | 09:13 |
falktx|work | not using language or OS specific features, but the plugin API | 09:13 |
FaTony | falktx|work, well I would do something like std::cerr | 09:17 |
FaTony | but you really should put try/catch around DPF calls | 09:17 |
falktx|work | I'd prefer no. I can put them in the constructor and UI calls, but nothing else | 09:18 |
falktx|work | if your plugin throws exceptions, something is wrong with it... | 09:18 |
FaTony | falktx|work, then put that in documentation | 09:19 |
falktx|work | yes | 09:19 |
falktx|work | documentation is something I always leave for last | 09:20 |
*** rncbc has joined #kxstudio | 09:45 | |
*** Aria is now known as Aria|away | 11:00 | |
*** DoverMo has quit IRC | 11:18 | |
*** BitPuffin has joined #kxstudio | 11:50 | |
*** FaTony has quit IRC | 12:38 | |
*** Aria|away is now known as Aria | 13:27 | |
*** Aria is now known as Aria22 | 13:27 | |
*** wolftune has joined #kxstudio | 13:52 | |
*** ArturShaik has joined #kxstudio | 13:54 | |
*** ArturSha1 has quit IRC | 13:57 | |
*** ArturShaik has quit IRC | 14:36 | |
*** youki has joined #kxstudio | 15:26 | |
*** youki has quit IRC | 15:41 | |
*** Aria22 is now known as Aria22|away | 15:56 | |
*** wolftune has quit IRC | 16:09 | |
*** falktx|work has quit IRC | 16:37 | |
*** Yruama_Lairba has joined #kxstudio | 16:54 | |
*** jablo has joined #kxstudio | 17:11 | |
*** Aria22|away is now known as Aria22 | 17:30 | |
*** tjingboem has joined #kxstudio | 17:31 | |
*** GrusGrus has joined #kxstudio | 17:34 | |
*** tjingboem has quit IRC | 17:50 | |
*** vlad__ has joined #kxstudio | 18:07 | |
*** vlad__ has quit IRC | 18:13 | |
*** vlad__ has joined #kxstudio | 18:14 | |
*** BitPuffin has quit IRC | 18:24 | |
*** wolftune has joined #kxstudio | 18:42 | |
*** GrusGrus has quit IRC | 18:46 | |
*** wolftune has quit IRC | 19:29 | |
*** bill-auger_ has joined #kxstudio | 19:50 | |
*** bill-auger has quit IRC | 19:51 | |
*** wolftune has joined #kxstudio | 19:57 | |
*** olinuxx has quit IRC | 20:31 | |
*** olinuxx has joined #kxstudio | 20:58 | |
*** JackWinter has quit IRC | 21:03 | |
*** JackWinter has joined #kxstudio | 21:03 | |
*** jablo has quit IRC | 21:20 | |
*** rncbc has quit IRC | 21:59 | |
*** vlad__ has quit IRC | 22:02 | |
*** bill-auger has joined #kxstudio | 22:08 | |
*** bill-auger_ has quit IRC | 22:08 | |
*** falktx has quit IRC | 22:37 | |
*** Animtim_ has joined #kxstudio | 22:40 | |
*** Animtim has quit IRC | 22:44 | |
*** falktx has joined #kxstudio | 22:46 | |
*** dreamer has quit IRC | 23:12 | |
*** mothi has quit IRC | 23:12 | |
*** NoCode has quit IRC | 23:12 | |
*** willer has quit IRC | 23:12 | |
*** willer has joined #kxstudio | 23:18 | |
*** mothi has joined #kxstudio | 23:18 | |
*** NoCode has joined #kxstudio | 23:55 |
Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!