@@ -228,9 +228,9 @@ private unsafe static int Read(
228228
229229 return toReturn ;
230230 }
231- catch
231+ catch ( Exception ex )
232232 {
233- // TODO: Set a rich error message for libgit2
233+ Proxy . giterr_set_str ( GitErrorCategory . Odb , ex ) ;
234234 }
235235 finally
236236 {
@@ -295,9 +295,9 @@ private unsafe static int ReadPrefix(
295295
296296 return toReturn ;
297297 }
298- catch
298+ catch ( Exception ex )
299299 {
300- // TODO: Set a rich error message for libgit2
300+ Proxy . giterr_set_str ( GitErrorCategory . Odb , ex ) ;
301301 }
302302 finally
303303 {
@@ -339,9 +339,9 @@ private static int ReadHeader(
339339
340340 return toReturn ;
341341 }
342- catch
342+ catch ( Exception ex )
343343 {
344- // TODO: Set a rich error message for libgit2
344+ Proxy . giterr_set_str ( GitErrorCategory . Odb , ex ) ;
345345 }
346346 }
347347
@@ -376,9 +376,9 @@ private static unsafe int Write(
376376 return toReturn ;
377377 }
378378 }
379- catch
379+ catch ( Exception ex )
380380 {
381- // TODO: Set a rich error message for libgit2
381+ Proxy . giterr_set_str ( GitErrorCategory . Odb , ex ) ;
382382 }
383383 }
384384
@@ -411,9 +411,9 @@ private static int WriteStream(
411411
412412 return toReturn ;
413413 }
414- catch
414+ catch ( Exception ex )
415415 {
416- // TODO: Set a rich error message for libgit2
416+ Proxy . giterr_set_str ( GitErrorCategory . Odb , ex ) ;
417417 }
418418 }
419419
@@ -444,9 +444,9 @@ private static int ReadStream(
444444
445445 return toReturn ;
446446 }
447- catch
447+ catch ( Exception ex )
448448 {
449- // TODO: Set a rich error message for libgit2
449+ Proxy . giterr_set_str ( GitErrorCategory . Odb , ex ) ;
450450 }
451451 }
452452
@@ -465,9 +465,9 @@ private static bool Exists(
465465 {
466466 return odbBackend . Exists ( oid . Id ) ;
467467 }
468- catch
468+ catch ( Exception ex )
469469 {
470- // TODO: Set a rich error message for libgit2
470+ Proxy . giterr_set_str ( GitErrorCategory . Odb , ex ) ;
471471 }
472472 }
473473
@@ -487,9 +487,9 @@ private static int Foreach(
487487 {
488488 return odbBackend . Foreach ( new ForeachState ( cb , data ) . ManagedCallback ) ;
489489 }
490- catch
490+ catch ( Exception ex )
491491 {
492- // TODO: Set a rich error message for libgit2
492+ Proxy . giterr_set_str ( GitErrorCategory . Odb , ex ) ;
493493 }
494494 }
495495
@@ -508,9 +508,9 @@ private static void Free(
508508 {
509509 odbBackend . Dispose ( ) ;
510510 }
511- catch
511+ catch ( Exception ex )
512512 {
513- // TODO: Set a rich error message for libgit2
513+ Proxy . giterr_set_str ( GitErrorCategory . Odb , ex ) ;
514514 }
515515 }
516516 }
0 commit comments