mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-17 13:27:30 +03:00
Add back padding when errors/traces actually occur
This commit is contained in:
parent
9f2089798f
commit
12ec621d23
@ -1073,7 +1073,7 @@ bugMsg ppe tr name (errs, tm) =
|
||||
|
||||
stackTrace :: PrettyPrintEnv -> [(Reference, Int)] -> Pretty ColorText
|
||||
stackTrace _ [] = mempty
|
||||
stackTrace ppe tr = "Stack trace:\n" <> P.indentN 2 (P.lines $ f <$> tr)
|
||||
stackTrace ppe tr = "\nStack trace:\n" <> P.indentN 2 (P.lines $ f <$> tr)
|
||||
where
|
||||
f (rf, n) = name <> count
|
||||
where
|
||||
@ -1223,8 +1223,8 @@ tabulateErrors :: Set DecompError -> Error
|
||||
tabulateErrors errs | null errs = mempty
|
||||
tabulateErrors errs =
|
||||
P.indentN 2 . P.lines $
|
||||
P.wrap "The following errors occured while decompiling:"
|
||||
: (listErrors errs)
|
||||
"" : P.wrap "The following errors occured while decompiling:"
|
||||
: (listErrors errs)
|
||||
|
||||
restoreCache :: StoredCache -> IO CCache
|
||||
restoreCache (SCache cs crs trs ftm fty int rtm rty sbs) =
|
||||
|
@ -52,6 +52,7 @@ test2 = do
|
||||
(typeLink IOFailure)
|
||||
"Cannot decode byte '\\xee': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream"
|
||||
(Any ())
|
||||
|
||||
Stack trace:
|
||||
##raise
|
||||
|
||||
@ -64,6 +65,7 @@ test2 = do
|
||||
The program halted with an unhandled exception:
|
||||
|
||||
Failure (typeLink RuntimeFailure) "builtin.bug" (Any "whoa")
|
||||
|
||||
Stack trace:
|
||||
##raise
|
||||
|
||||
|
@ -92,6 +92,7 @@ myServer = unsafeRun! '(hello "127.0.0.1" "0")
|
||||
value:
|
||||
|
||||
Failure (typeLink IOFailure) "problem" (Any ())
|
||||
|
||||
Stack trace:
|
||||
bug
|
||||
#8ppr1tt4q2
|
||||
|
@ -615,6 +615,7 @@ Calling our examples with the wrong number of args will error.
|
||||
The program halted with an unhandled exception:
|
||||
|
||||
Failure (typeLink IOFailure) "called with args" (Any ())
|
||||
|
||||
Stack trace:
|
||||
##raise
|
||||
|
||||
@ -627,6 +628,7 @@ Calling our examples with the wrong number of args will error.
|
||||
The program halted with an unhandled exception:
|
||||
|
||||
Failure (typeLink IOFailure) "called with no args" (Any ())
|
||||
|
||||
Stack trace:
|
||||
##raise
|
||||
|
||||
@ -640,6 +642,7 @@ Calling our examples with the wrong number of args will error.
|
||||
|
||||
Failure
|
||||
(typeLink IOFailure) "called with too many args" (Any ())
|
||||
|
||||
Stack trace:
|
||||
##raise
|
||||
|
||||
@ -652,6 +655,7 @@ Calling our examples with the wrong number of args will error.
|
||||
The program halted with an unhandled exception:
|
||||
|
||||
Failure (typeLink IOFailure) "called with no args" (Any ())
|
||||
|
||||
Stack trace:
|
||||
##raise
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
value:
|
||||
|
||||
"implement me later"
|
||||
|
||||
Stack trace:
|
||||
todo
|
||||
#qe5e1lcfn8
|
||||
@ -48,6 +49,7 @@
|
||||
value:
|
||||
|
||||
"there's a bug in my code"
|
||||
|
||||
Stack trace:
|
||||
bug
|
||||
#m67hcdcoda
|
||||
|
@ -97,6 +97,7 @@ unique type RuntimeError =
|
||||
The program halted with an unhandled exception:
|
||||
|
||||
Failure (typeLink RuntimeError) "oh noes!" (Any ())
|
||||
|
||||
Stack trace:
|
||||
##raise
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user