Skip to content

Commit

Permalink
fix: the error message and the commnet
Browse files Browse the repository at this point in the history
  • Loading branch information
granddaifuku committed Nov 2, 2022
1 parent c2b1002 commit 603f933
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onlinejudge_verify/languages/cplusplus_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def update(self, path: pathlib.Path) -> None:
if re.match(rb'\s*#\s*pragma\s+once\s*', line): # #pragma once は comment 扱いで消されてしまう
logger.debug('%s: line %s: #pragma once', str(path), i + 1)
if non_guard_line_found:
# 先頭以外で #pragma once されてた場合は諦める
raise BundleErrorAt(path, i + 1, "#pragma once found in a non-first line")
# #pragma once の前にコードが書かれていた場合に落とす
raise BundleErrorAt(path, i + 1, "found codes before #pragma once")
if include_guard_macro is not None:
raise BundleErrorAt(path, i + 1, "#pragma once found in an include guard with #ifndef")
if path.resolve() in self.pragma_once:
Expand Down

0 comments on commit 603f933

Please sign in to comment.