Skip to content

Commit 8afc62d

Browse files
authored
Merge pull request #12 from norwegian-geotechnical-institute/4-if-crash-give-error-message-with-line-number
Parse error now include problematic line number and data
2 parents ee690ef + 72cd582 commit 8afc62d

File tree

6 files changed

+125
-110
lines changed

6 files changed

+125
-110
lines changed

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Python KOF Parser Package
22

3+
## Version 0.0.16
4+
5+
_2023-04-28_
6+
7+
Change
8+
9+
- Fail to parse a KOF file, now raise an exception containing the offending line number in the problem file.
10+
311
## Version 0.0.15
412

513
_2023-04-25_

poetry.lock

Lines changed: 64 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exclude = '''
1515

1616
[tool.poetry]
1717
name = "kof-parser"
18-
version = "0.0.15"
18+
version = "0.0.16"
1919
description = "A KOF file parser. Follows Norkart's KOF 2.0 specification from 2005."
2020
license = "MIT"
2121
authors = ["Magnus Mariero <[email protected]>", "Jostein Leira <[email protected]>"]

src/kof_parser/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from kof_parser.exceptions import *
12
from kof_parser.kof import *
23
from kof_parser.model import *
34
from kof_parser.parser import *

src/kof_parser/exceptions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class ParseError(Exception):
2+
def __init__(self, msg: str):
3+
super().__init__(msg)

0 commit comments

Comments
 (0)