File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,12 @@ def decompress_data
329329 # Check for GZip magic number
330330 if is_gzip ( @compressed_data )
331331 zlib_inflater = Zlib ::Inflate . new ( Zlib ::MAX_WBITS + 16 )
332- @decompressed_data = zlib_inflater . inflate ( @compressed_data )
332+ begin
333+ @decompressed_data = zlib_inflater . inflate ( @compressed_data )
334+ rescue StandardError => error
335+ # warn "\033[101m#{error}\033[m" # Prettified colors
336+ @logger . error ( "AppleNote: Note #{ @note_id } somehow tried to decompress something that was GZIP but had to rescue error: #{ error } " )
337+ end
333338 else
334339 @logger . error ( "AppleNote: Note #{ @note_id } somehow tried to decompress something that was not a GZIP" )
335340 end
Original file line number Diff line number Diff line change @@ -676,7 +676,12 @@ def rip_notes()
676676 "ZICCLOUDSYNCINGOBJECT.ZMODIFICATIONDATE1 >= ? AND " +
677677 "ZICCLOUDSYNCINGOBJECT.ZMODIFICATIONDATE1 <= ?"
678678 @database . execute ( tmp_query , range_start_core , range_end_core ) do |row |
679- self . rip_note ( row [ "ZNOTE" ] )
679+ begin
680+ self . rip_note ( row [ "ZNOTE" ] )
681+ rescue StandardError => error
682+ # warn "\033[101m#{e}\033[m"
683+ @logger . error ( "AppleNoteStore: NoteStore tried to rip Note#{ row [ "ZNOTE" ] } but had to rescue error: #{ error } " )
684+ end
680685 end
681686 end
682687
You can’t perform that action at this time.
0 commit comments