File tree Expand file tree Collapse file tree 6 files changed +901
-1
lines changed
Expand file tree Collapse file tree 6 files changed +901
-1
lines changed Original file line number Diff line number Diff line change @@ -65,4 +65,4 @@ __recovery/
6565# Castalia statistics file (since XE7 Castalia is distributed with Delphi)
6666* .stat
6767
68- / modules
68+ modules /
Original file line number Diff line number Diff line change 1+ {
2+ "hash" : " 6ef9161b900632671022358216c7dfe7" ,
3+ "updated" : " 2019-10-15T22:07:14.0506259-03:00" ,
4+ "installedModules" : {
5+ "github.com/hashload/handle-exception" : {
6+ "name" : " handle-exception" ,
7+ "version" : " 0.1.2" ,
8+ "hash" : " 519df8be252fbda605e46bef8d604915" ,
9+ "artifacts" : {},
10+ "failed" : false ,
11+ "changed" : false
12+ },
13+ "github.com/hashload/horse" : {
14+ "name" : " horse" ,
15+ "version" : " 1.6.8" ,
16+ "hash" : " 7a0b2394ac49dbd1a62f6d1021cac5b9" ,
17+ "artifacts" : {},
18+ "failed" : false ,
19+ "changed" : false
20+ },
21+ "github.com/hashload/jhonson" : {
22+ "name" : " jhonson" ,
23+ "version" : " 1.0.3" ,
24+ "hash" : " 334dfe6b2e7daa4cb6af5b1bf88ec76e" ,
25+ "artifacts" : {},
26+ "failed" : false ,
27+ "changed" : false
28+ }
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " samples" ,
3+ "description" : " " ,
4+ "version" : " 1.0.0" ,
5+ "homepage" : " " ,
6+ "mainsrc" : " ./" ,
7+ "projects" : [],
8+ "dependencies" : {
9+ "github.com/HashLoad/handle-exception" : " ^0.1.2" ,
10+ "github.com/HashLoad/horse" : " ^1.6.8" ,
11+ "github.com/hashload/jhonson" : " ^1.0.3"
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ program samples;
2+
3+ { $APPTYPE CONSOLE}
4+
5+ uses
6+ Horse,
7+ Horse.Jhonson,
8+ Horse.HandleException,
9+ System.SysUtils;
10+
11+ { $R *.res}
12+
13+ var
14+ App: THorse;
15+
16+ begin
17+ App := THorse.Create(9000 );
18+
19+ App.Use(Jhonson);
20+ App.Use(HandleException);
21+
22+ App.Get(' ping' ,
23+ procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
24+ begin
25+ raise Exception.Create(' Meu erro personalizado!' );
26+ end );
27+
28+ App.Start;
29+ end .
You can’t perform that action at this time.
0 commit comments