lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb in ddr-antivirus-2.0.0.rc1 vs lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb in ddr-antivirus-2.0.0.rc2
- old
+ new
@@ -15,12 +15,12 @@
result = ScanResult.new(path, output, version: version, scanned_at: Time.now.utc)
case status.exitstatus
when 0
result
when 1
- raise VirusFoundError, result.to_s
+ raise VirusFoundError.new(result)
when 2
- raise ScannerError, result.to_s
+ raise ScannerError.new(result)
end
end
def clamdscan(path)
make_readable(path) do