Commit Graph

32 Commits

Author SHA1 Message Date
daniel
ee7a266bb7 single error type for cstring conversion 2020-11-16 11:50:40 +01:00
Josh Mitchell
62462ed8c3 Unified conversion errors and improved messages 2020-11-15 18:30:57 +11:00
Josh Mitchell
2221531f75 Improved out-of-range error messages 2020-11-15 17:44:49 +11:00
Josh Mitchell
4a71ed001c New NumAtomsOutOfRange error variant 2020-11-15 17:39:22 +11:00
Josh Mitchell
7acde7f7de Use c_int and c_float behind closed doors rather than i32/f32 2020-11-15 17:13:46 +11:00
Josh Mitchell
8f310f3fe7 Added from type info to cast errors 2020-11-15 16:54:42 +11:00
Josh Mitchell
8f34cdfcdf no more BindgenTy1 2020-11-15 16:48:52 +11:00
Josh Mitchell
58719dad5d Removed all fallible casts (except in tests) 2020-11-14 13:02:19 +11:00
Josh Mitchell
734048d572 Refactor frame to have desired semantics 2020-11-13 12:37:23 +01:00
Josh Mitchell
d784be8be5 Improved seek errors and implemented for TRR and XTC 2020-11-12 15:38:57 +01:00
daniel
80b6cafc66 reverted to single ReadNAtom error type 2020-11-12 09:59:59 +01:00
Josh Mitchell
53dd997129 Broke out next_inner 2020-11-11 17:11:55 +11:00
daniel
0d887fc515 tests 2020-11-10 17:46:11 +01:00
daniel
7a22031bee move check_code to lib 2020-11-10 17:22:43 +01:00
daniel
56a15b7a41 code cleanup 2020-11-10 17:02:34 +01:00
Josh Mitchell
7ee04620f6 Error::task() now checks sources 2020-11-10 20:11:15 +11:00
Josh Mitchell
323ba0b88c Clarified error message when read_num_atoms() fails during read() 2020-11-10 19:49:58 +11:00
Josh Mitchell
85b106f5d8 Returned Error to being an enum, as other fields were unused 2020-11-10 19:34:58 +11:00
Josh Mitchell
ce16b20b67 Slightly clearer docs 2020-11-10 18:52:16 +11:00
Josh Mitchell
51635f2583 Restricted ErrorTask to only being relevant to C API errors 2020-11-10 18:50:14 +11:00
Josh Mitchell
420af8b369 Reduced role of ErrorTask to simplify errors 2020-11-10 18:17:23 +11:00
Josh Mitchell
4a99b4e0b0 Cleaned up errors a bit 2020-11-10 17:51:41 +11:00
Josh Mitchell
65294abee8 Replaced frame resizing with a simple check 2020-11-10 17:41:11 +11:00
Josh Mitchell
1fbce21ff6 Corrected undefined behaviour when calling Trajectory.read() on improperly sized Frame 2020-11-10 00:59:10 +11:00
Josh Mitchell
d1b69d3fd4 Treat ToCString differently in Display based on whether it has a source 2020-11-09 22:42:50 +11:00
Josh Mitchell
9ac3c959d9 Added ToCString variant to Error.source() 2020-11-09 22:40:37 +11:00
Josh Mitchell
f757072523 Added documentation to the errors module 2020-11-09 22:14:16 +11:00
Josh Mitchell
95b1bdba57 Streamlined error generation 2020-11-09 22:12:07 +11:00
Josh Mitchell
36a722e721 Refactored ErrorCode as Error.source() 2020-11-09 22:06:03 +11:00
Josh Mitchell
18436aaaa3 Nicer error messages 2020-11-09 22:04:23 +11:00
Josh Mitchell
4ca96364b9 Made error construction methods pub(crate) 2020-11-09 22:03:00 +11:00
Josh Mitchell
55fa21d45c Broke out errors module and handle error codes as rust enum 2020-11-09 21:58:39 +11:00