Skip to content

Commit

Permalink
Updates for latest Sparse version
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpatrickmorgan committed Jan 16, 2019
1 parent 1268a43 commit fabebe6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
7 changes: 4 additions & 3 deletions Sources/App/Controllers/OutputController.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation
import Vapor
import Sparse

class OutputController {

Expand All @@ -24,15 +25,15 @@ class OutputController {

return try req.view().render("output", node)

} catch let error as ParsingError {
} catch let error as ParserError {

let context = [
"prefill": trimmedInput,
"error": error.parsingErrorDescription
"error": error.description
]

let logger = try req.make(Logger.self)
logger.error(["PARSING ERROR:", trimmedInput, error.parsingErrorDescription].joined(separator: "\n"))
logger.error(["PARSING ERROR:", trimmedInput, error.description].joined(separator: "\n"))

return try req.view().render("input", context)
}
Expand Down
23 changes: 0 additions & 23 deletions Sources/App/Models/Errors/ParsingError.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Sources/App/Parsing/ConstraintsParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ enum ConstraintsParser {
static func parse(input: String) throws -> ConstraintGroup {

let stream = Stream(input)
let constraints = try constraintsLog._run(stream)
let constraints = try constraintsLog.parse(stream)

return ConstraintGroup(constraints, raw: input)
}
Expand Down

0 comments on commit fabebe6

Please sign in to comment.