Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Komodo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dragoon
Komodo
Commits
1e28dba9
Verified
Commit
1e28dba9
authored
11 months ago
by
STEVAN Antoine
Browse files
Options
Downloads
Patches
Plain Diff
refactor `error throw` in `error.nu`
parent
8e3d2851
No related branches found
No related tags found
1 merge request
!117
split `examples/` into `benchmarks/` and `bins/`
Pipeline
#5268
passed
11 months ago
Stage: fmt
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.nushell/color.nu
+2
-10
2 additions, 10 deletions
.nushell/color.nu
.nushell/error.nu
+9
-0
9 additions, 0 deletions
.nushell/error.nu
with
11 additions
and
10 deletions
.nushell/color.nu
+
2
−
10
View file @
1e28dba9
use error.nu "error throw"
export const WHITE = { r: 1.0, g: 1.0, b: 1.0 }
export const WHITE = { r: 1.0, g: 1.0, b: 1.0 }
export const BLACK = { r: 0.0, g: 0.0, b: 0.0 }
export const BLACK = { r: 0.0, g: 0.0, b: 0.0 }
export const RED = { r: 1.0, g: 0.0, b: 0.0 }
export const RED = { r: 1.0, g: 0.0, b: 0.0 }
export const GREEN = { r: 0.0, g: 1.0, b: 0.0 }
export const GREEN = { r: 0.0, g: 1.0, b: 0.0 }
export const BLUE = { r: 0.0, g: 0.0, b: 1.0 }
export const BLUE = { r: 0.0, g: 0.0, b: 1.0 }
def "error throw" [err: record<err: string, label: string, span: record<start: int, end: int>>] {
error make {
msg: $"(ansi red_bold)($err.err)(ansi reset)",
label: {
text: $err.label,
span: $err.span,
},
}
}
export def "color from-floats" [
export def "color from-floats" [
r: float,
r: float,
g: float,
g: float,
...
...
This diff is collapsed.
Click to expand it.
.nushell/error.nu
0 → 100644
+
9
−
0
View file @
1e28dba9
export def "error throw" [err: record<err: string, label: string, span: record<start: int, end: int>>] {
error make {
msg: $"(ansi red_bold)($err.err)(ansi reset)",
label: {
text: $err.label,
span: $err.span,
},
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment